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:
Joachim Wiberg committed 2022-01-01 18:20:47 +01:00
1 parent 1cf204e23d
commit cb2969002c
3 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -286,7 +286,7 @@ static void prepare_tty(char *tty, speed_t speed, char *procname, struct rlimit
static int activate_console(int noclear, int nowait)
{
static const char msg[] = "\nPlease press Enter to activate this console.";
static const char clr[] = "\r\e[2K";
static const char clr[] = "\r\e[K";
static const char cup[] = "\e[A";
struct termios orig;
char c;