From 1a84c938da38877be77d6206d9474a87e982b1a0 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Tue, 31 Jul 2012 14:56:11 +0200 Subject: [PATCH] vte: add SU/SD CSIs SU and SD are used to scroll-up and scroll-down the visible buffer. Margins are kept and the cursor position does not change. This is a valid vt510 CSI. Signed-off-by: David Herrmann --- src/vte.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/vte.c b/src/vte.c index c414310..04fa0a0 100644 --- a/src/vte.c +++ b/src/vte.c @@ -1452,6 +1452,20 @@ static void do_csi(struct kmscon_vte *vte, uint32_t data) /* device status reports */ csi_dsr(vte); break; + case 'S': /* SU */ + /* scroll up */ + num = vte->csi_argv[0]; + if (num <= 0) + num = 1; + kmscon_console_scroll_up(vte->con, num); + break; + case 'T': /* SD */ + /* scroll down */ + num = vte->csi_argv[0]; + if (num <= 0) + num = 1; + kmscon_console_scroll_down(vte->con, num); + break; default: log_debug("unhandled CSI sequence %c", data); }