From 65424fa3046597161f8a94ddced4e47a77e18b1c Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Tue, 31 Jul 2012 14:57:47 +0200 Subject: [PATCH] vte: add CHA CSI The CHA CSI is used to move the cursor horizontally but keep the vertical position. Signed-off-by: David Herrmann --- src/vte.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/vte.c b/src/vte.c index fb01822..2a01fe0 100644 --- a/src/vte.c +++ b/src/vte.c @@ -1331,6 +1331,14 @@ static void do_csi(struct kmscon_vte *vte, uint32_t data) y = 1; kmscon_console_move_to(vte->con, y - 1, x - 1); break; + case 'G': /* CHA */ + /* Cursor Character Absolute */ + num = vte->csi_argv[0]; + if (num <= 0) + num = 1; + y = kmscon_console_get_cursor_y(vte->con); + kmscon_console_move_to(vte->con, num - 1, y); + break; case 'J': if (vte->csi_flags & CSI_WHAT) protect = true;