mirror of
https://github.com/troglobit/finit.git
synced 2026-10-24 11:54:36 +00:00
Fix #210: simplify escape code to clear line
Since we just want to clear the complete line, and are already a the beginning of the line, we can use the simpler \e[K which also seems to fix the display resize bug in #210. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
1cf204e23d
commit
cb2969002c
3 files changed
+4
-4
No files matched your search
+2
-2
@@ -227,7 +227,7 @@ void print_banner(const char *heading)
|
||||
return;
|
||||
|
||||
buf[0] = 0;
|
||||
strlcat(buf, "\r\e[2K", sizeof(buf));
|
||||
strlcat(buf, "\r\e[K", sizeof(buf));
|
||||
|
||||
if (progress_style == PROGRESS_CLASSIC) {
|
||||
strlcat(buf, "\e[1m", sizeof(buf));
|
||||
@@ -312,7 +312,7 @@ void printv(const char *fmt, va_list ap)
|
||||
if (progress_style == PROGRESS_CLASSIC)
|
||||
cprintf("\r%s ", pad(buf, sizeof(buf), ".", sizeof(buf)));
|
||||
else
|
||||
cprintf("\r\e[2K%s%s", status(3), buf);
|
||||
cprintf("\r\e[K%s%s", status(3), buf);
|
||||
}
|
||||
|
||||
void print(int rc, const char *fmt, ...)
|
||||
|
||||
Reference in new issue
Block a user