summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/input.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2013-01-15 23:18:55 +0000
committernicm <nicm@openbsd.org>2013-01-15 23:18:55 +0000
commitf752bf020cc55758eeed4fb10e82c12a8c675f6e (patch)
tree4ab216bb6c3fcc12c7105626e188b06eba864c4a /usr.bin/tmux/input.c
parentMore syncing with FreeBSD bge version. No binary change. (diff)
downloadwireguard-openbsd-f752bf020cc55758eeed4fb10e82c12a8c675f6e.tar.xz
wireguard-openbsd-f752bf020cc55758eeed4fb10e82c12a8c675f6e.zip
Implement ECH (erase character, CSI X). Reported by Christian Neukirchen.
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 18ca0cd7ffe..9b0355c5bb9 100644
--- a/usr.bin/tmux/input.c
+++ b/usr.bin/tmux/input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: input.c,v 1.55 2012/11/27 20:08:42 nicm Exp $ */
+/* $OpenBSD: input.c,v 1.56 2013/01/15 23:18:55 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -135,6 +135,7 @@ enum input_csi_type {
INPUT_CSI_DECSTBM,
INPUT_CSI_DL,
INPUT_CSI_DSR,
+ INPUT_CSI_ECH,
INPUT_CSI_ED,
INPUT_CSI_EL,
INPUT_CSI_HPA,
@@ -167,6 +168,7 @@ const struct input_table_entry input_csi_table[] = {
{ 'L', "", INPUT_CSI_IL },
{ 'M', "", INPUT_CSI_DL },
{ 'P', "", INPUT_CSI_DCH },
+ { 'X', "", INPUT_CSI_ECH },
{ 'Z', "", INPUT_CSI_CBT },
{ 'c', "", INPUT_CSI_DA },
{ 'c', ">", INPUT_CSI_DA_TWO },
@@ -1143,6 +1145,9 @@ input_csi_dispatch(struct input_ctx *ictx)
break;
}
break;
+ case INPUT_CSI_ECH:
+ screen_write_clearcharacter(sctx, input_get(ictx, 0, 1, 1));
+ break;
case INPUT_CSI_DCH:
screen_write_deletecharacter(sctx, input_get(ictx, 0, 1, 1));
break;