vte: add VPA/VPR CSIs
VPA and VPR are used to change the current line but keep the column. One does an absolute positioning and one a relative positioning. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
1a84c938da
commit
2898851269
17
src/vte.c
17
src/vte.c
@ -1303,6 +1303,23 @@ static void do_csi(struct kmscon_vte *vte, uint32_t data)
|
||||
num = 1;
|
||||
kmscon_console_move_left(vte->con, num);
|
||||
break;
|
||||
case 'd': /* VPA */
|
||||
/* Vertical Line Position Absolute */
|
||||
num = vte->csi_argv[0];
|
||||
if (num <= 0)
|
||||
num = 1;
|
||||
x = kmscon_console_get_cursor_x(vte->con);
|
||||
kmscon_console_move_to(vte->con, x, num - 1);
|
||||
break;
|
||||
case 'e': /* VPR */
|
||||
/* Vertical Line Position Relative */
|
||||
num = vte->csi_argv[0];
|
||||
if (num <= 0)
|
||||
num = 1;
|
||||
x = kmscon_console_get_cursor_x(vte->con);
|
||||
y = kmscon_console_get_cursor_y(vte->con);
|
||||
kmscon_console_move_to(vte->con, x, y + num);
|
||||
break;
|
||||
case 'H': /* CUP */
|
||||
case 'f': /* HVP */
|
||||
/* position cursor */
|
||||
|
Loading…
x
Reference in New Issue
Block a user