summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-send-keys.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2017-06-28 11:36:39 +0000
committernicm <nicm@openbsd.org>2017-06-28 11:36:39 +0000
commit0f99bcbc1eb53298abbdf425786417b890b41737 (patch)
tree8e6c56439570239e80c0c2a0d58427ed73900580 /usr.bin/tmux/cmd-send-keys.c
parentwhitespace fixes, from Rob Pierce and me (diff)
downloadwireguard-openbsd-0f99bcbc1eb53298abbdf425786417b890b41737.tar.xz
wireguard-openbsd-0f99bcbc1eb53298abbdf425786417b890b41737.zip
Apply the xterm key flag when needed for send-keys, fixes problem
reported by Franky Spamschleuder.
Diffstat (limited to 'usr.bin/tmux/cmd-send-keys.c')
-rw-r--r--usr.bin/tmux/cmd-send-keys.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd-send-keys.c b/usr.bin/tmux/cmd-send-keys.c
index 82312d6aa5f..2d602bac226 100644
--- a/usr.bin/tmux/cmd-send-keys.c
+++ b/usr.bin/tmux/cmd-send-keys.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-send-keys.c,v 1.41 2017/05/10 10:46:59 nicm Exp $ */
+/* $OpenBSD: cmd-send-keys.c,v 1.42 2017/06/28 11:36:39 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -64,6 +64,8 @@ cmd_send_keys_inject(struct client *c, struct cmdq_item *item, key_code key)
struct key_binding *bd, bd_find;
if (wp->mode == NULL || wp->mode->key_table == NULL) {
+ if (options_get_number(wp->window->options, "xterm-keys"))
+ key |= KEYC_XTERM;
window_pane_key(wp, NULL, s, key, NULL);
return;
}