summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/input.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2011-05-20 19:17:39 +0000
committernicm <nicm@openbsd.org>2011-05-20 19:17:39 +0000
commite5464ab32ad7ab22c74d8e460ef2ec1b171ef7dc (patch)
treeb9f4df06e37fc7b75dc29448dde41437f0ddaf99 /usr.bin/tmux/input.c
parentSupport xterm(1) cursor colour change sequences through terminfo(5) Cc (diff)
downloadwireguard-openbsd-e5464ab32ad7ab22c74d8e460ef2ec1b171ef7dc.tar.xz
wireguard-openbsd-e5464ab32ad7ab22c74d8e460ef2ec1b171ef7dc.zip
Support DECSCUSR sequence to set the cursor style with two new
terminfo(5) extensions, Cs and Csr. Written by Ailin Nemui.
Diffstat (limited to 'usr.bin/tmux/input.c')
-rw-r--r--usr.bin/tmux/input.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/tmux/input.c b/usr.bin/tmux/input.c
index c465df2efd8..816b1244f00 100644
--- a/usr.bin/tmux/input.c
+++ b/usr.bin/tmux/input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: input.c,v 1.38 2011/05/20 19:03:58 nicm Exp $ */
+/* $OpenBSD: input.c,v 1.39 2011/05/20 19:17:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -126,6 +126,7 @@ enum input_csi_type {
INPUT_CSI_CUU,
INPUT_CSI_DA,
INPUT_CSI_DCH,
+ INPUT_CSI_DECSCUSR,
INPUT_CSI_DECSTBM,
INPUT_CSI_DL,
INPUT_CSI_DSR,
@@ -168,6 +169,7 @@ const struct input_table_entry input_csi_table[] = {
{ 'l', "?", INPUT_CSI_RM_PRIVATE },
{ 'm', "", INPUT_CSI_SGR },
{ 'n', "", INPUT_CSI_DSR },
+ { 'q', " ", INPUT_CSI_DECSCUSR },
{ 'r', "", INPUT_CSI_DECSTBM },
};
@@ -1259,6 +1261,10 @@ input_csi_dispatch(struct input_ctx *ictx)
n = input_get(ictx, 0, 1, 1);
screen_write_cursormove(sctx, s->cx, n - 1);
break;
+ case INPUT_CSI_DECSCUSR:
+ n = input_get(ictx, 0, 0, 0);
+ screen_set_cursor_style(s, n);
+ break;
}
return (0);