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 <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-07-31 14:56:11 +02:00
parent b4bbc2b087
commit 1a84c938da

View File

@ -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);
}