Honour the --force setting when writing the progress display

This commit is contained in:
Andrew Wood
2023-07-16 21:58:08 +01:00
parent c8090806f9
commit bcb33ce2aa
5 changed files with 19 additions and 5 deletions
+2 -2
View File
@@ -1041,12 +1041,12 @@ void pv_display(pvstate_t state, long double esec, long long sl,
if (state->numeric) {
write(STDERR_FILENO, display, strlen(display));
} else if (state->cursor) {
if (pv_in_foreground()) {
if (state->force || pv_in_foreground()) {
pv_crs_update(state, display);
state->display_visible = true;
}
} else {
if (pv_in_foreground()) {
if (state->force || pv_in_foreground()) {
write(STDERR_FILENO, display, strlen(display));
write(STDERR_FILENO, "\r", 1);
state->display_visible = true;