mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Optimize clear screen command
Replaced system call with inline ANSI/VT100 clear screen code sequence
This commit is contained in:
parent
9c7e4ba06e
commit
07255c94b9
1 changed files with 3 additions and 1 deletions
|
|
@ -134,7 +134,9 @@ void handle_command_sequence(char input_char, char previous_char, char *output_c
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KEY_L:
|
case KEY_L:
|
||||||
status = system("clear");
|
/* Clear screen using ANSI/VT100 escape code */
|
||||||
|
printf("\033c");
|
||||||
|
fflush(stdout);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KEY_Q:
|
case KEY_Q:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue