summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/input.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2017-02-08 17:31:09 +0000
committernicm <nicm@openbsd.org>2017-02-08 17:31:09 +0000
commitf0063641693bf9c391e3380df0dc2de8d6de156d (patch)
tree5e006532064dcfaad83a6e6d9f5c9f0b563369f3 /usr.bin/tmux/input.c
parentCleanup the device removal path (diff)
downloadwireguard-openbsd-f0063641693bf9c391e3380df0dc2de8d6de156d.tar.xz
wireguard-openbsd-f0063641693bf9c391e3380df0dc2de8d6de156d.zip
Add support for scroll up escape sequence (CSI S) and use it when
possible instead of sending individual line feeds.
Diffstat (limited to 'usr.bin/tmux/input.c')
-rw-r--r--usr.bin/tmux/input.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/tmux/input.c b/usr.bin/tmux/input.c
index f26a73ad525..5c50566e117 100644
--- a/usr.bin/tmux/input.c
+++ b/usr.bin/tmux/input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: input.c,v 1.114 2017/02/08 16:45:18 nicm Exp $ */
+/* $OpenBSD: input.c,v 1.115 2017/02/08 17:31:09 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -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: