vte: implement CSI-K
The K CSI is used to erase parts of the current line. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
9b058b1f90
commit
a5a357e012
@ -237,6 +237,15 @@ static void parse_csi(struct kmscon_vte *vte, uint32_t val)
|
||||
vte->parser.state = STATE_NORMAL;
|
||||
|
||||
switch (val) {
|
||||
case 'K':
|
||||
if (vte->parser.csi_argc < 1 ||
|
||||
vte->parser.csi_argv[0] == 0)
|
||||
kmscon_console_erase_cursor_to_end(vte->con);
|
||||
else if (vte->parser.csi_argv[0] == 1)
|
||||
kmscon_console_erase_home_to_cursor(vte->con);
|
||||
else if (vte->parser.csi_argv[0] == 2)
|
||||
kmscon_console_erase_current_line(vte->con);
|
||||
break;
|
||||
default:
|
||||
log_debug("vte: unhandled CSI sequence\n");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user