terminal-util: add new helper terminal_reset_defensive() that combines reset-by-ioctl and reset-by-sequence reasonably
This commit is contained in:
@@ -133,7 +133,7 @@ static void print_welcome(int rfd) {
|
||||
pn = os_release_pretty_name(pretty_name, os_name);
|
||||
ac = isempty(ansi_color) ? "0" : ansi_color;
|
||||
|
||||
(void) reset_terminal_fd(STDIN_FILENO, /* switch_to_text= */ false);
|
||||
(void) terminal_reset_defensive(STDIN_FILENO, /* switch_to_text= */ false);
|
||||
|
||||
if (colors_enabled())
|
||||
printf("\nWelcome to your new installation of \x1B[%sm%s\x1B[0m!\n", ac, pn);
|
||||
|
||||
Reference in New Issue
Block a user