mirror of
https://github.com/systemd/systemd
synced 2024-09-30 05:15:19 +00:00
repart: make prefix argument to clear_progress_bar() optional
In this case, let's try to override the whole line, not just the first few chars.
This commit is contained in:
parent
953bddee2f
commit
ad25ede488
|
@ -532,7 +532,9 @@ void clear_progress_bar(const char *prefix) {
|
|||
fputc('\r', stderr);
|
||||
|
||||
if (terminal_is_dumb())
|
||||
fputs(strrepa(" ", utf8_console_width(prefix) + 4), /* 4: %3.0f%% */
|
||||
fputs(strrepa(" ",
|
||||
prefix ? utf8_console_width(prefix) + 4 :
|
||||
LESS_BY(columns(), 1U)), /* 4: %3.0f%% */
|
||||
stderr);
|
||||
else
|
||||
fputs(ANSI_ERASE_TO_END_OF_LINE, stderr);
|
||||
|
|
Loading…
Reference in a new issue