summaryrefslogtreecommitdiffstats
path: root/input.c
diff options
context:
space:
mode:
authornicm <nicm>2017-02-08 17:31:09 +0000
committernicm <nicm>2017-02-08 17:31:09 +0000
commite100d465daefd20da0bb5eea87c4b4896badff16 (patch)
treeff477fbaf93b7acbe2245fe02b1bbf906a6d159a /input.c
parent13a0b6bb3fe05454cace81f5ec7624f6fd9021a5 (diff)
Add support for scroll up escape sequence (CSI S) and use it when
possible instead of sending individual line feeds.
Diffstat (limited to 'input.c')
-rw-r--r--input.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/input.c b/input.c
index d5b8737d..b96ac7ef 100644
--- a/input.c
+++ b/input.c
@@ -222,6 +222,7 @@ enum input_csi_type {
INPUT_CSI_SGR,
INPUT_CSI_SM,
INPUT_CSI_SM_PRIVATE,
+ INPUT_CSI_SU,
INPUT_CSI_TBC,
INPUT_CSI_VPA,
INPUT_CSI_WINOPS,
@@ -243,6 +244,7 @@ static const struct input_table_entry input_csi_table[] = {
{ 'L', "", INPUT_CSI_IL },
{ 'M', "", INPUT_CSI_DL },
{ 'P', "", INPUT_CSI_DCH },
+ { 'S', "", INPUT_CSI_SU },
{ 'X', "", INPUT_CSI_ECH },
{ 'Z', "", INPUT_CSI_CBT },
{ 'c', "", INPUT_CSI_DA },
@@ -1413,6 +1415,9 @@ input_csi_dispatch(struct input_ctx *ictx)
case INPUT_CSI_SM_PRIVATE:
input_csi_dispatch_sm_private(ictx);
break;
+ case INPUT_CSI_SU:
+ screen_write_scrollup(sctx, input_get(ictx, 0, 1, 1));
+ break;
case INPUT_CSI_TBC:
switch (input_get(ictx, 0, 0, 0)) {
case 0: