From 28988512696e70578e7df7d7cdb55737c2c90368 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Tue, 31 Jul 2012 14:57:04 +0200 Subject: [PATCH] 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 --- src/vte.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/vte.c b/src/vte.c index 04fa0a0..fb01822 100644 --- a/src/vte.c +++ b/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 */