summaryrefslogtreecommitdiffstats
authortcunha <tcunha>2010-10-24 00:30:51 (GMT)
committer Raghavendra D Prabhu <[email protected]>2011-01-02 18:59:30 (GMT)
commit8917ab0e8630245bd7389fba95286a134f74a973 (patch) (side-by-side diff)
tree546d4153e0204886a4469624e0324bccd58d6cb1
parent2a182f31733a48abd68e991ec4158edfbdcb89d6 (diff)
downloadtmux-old-8917ab0e8630245bd7389fba95286a134f74a973.zip
tmux-old-8917ab0e8630245bd7389fba95286a134f74a973.tar.gz
tmux-old-8917ab0e8630245bd7389fba95286a134f74a973.tar.bz2
Sync OpenBSD patchset 772:
Treat the meta bit in the xterm extended modifier key set as the same as escape (tmux's meta). From Emanuele Giaquinta.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--xterm-keys.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/xterm-keys.c b/xterm-keys.c
index c3a34b3..6d58f96 100644
--- a/xterm-keys.c
+++ b/xterm-keys.c
@@ -1,4 +1,4 @@
-/* $Id: xterm-keys.c,v 1.6 2010/09/07 13:21:18 tcunha Exp $ */
+/* $Id: xterm-keys.c,v 1.7 2010/10/24 00:30:51 tcunha Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <[email protected]>
@@ -128,6 +128,8 @@ xterm_keys_modifiers(const char *template, const char *buf, size_t len)
modifiers |= KEYC_ESCAPE;
if (param & 4)
modifiers |= KEYC_CTRL;
+ if (param & 8)
+ modifiers |= KEYC_ESCAPE;
return (modifiers);
}
@@ -172,6 +174,8 @@ xterm_keys_lookup(int key)
modifiers += 2;
if (key & KEYC_CTRL)
modifiers += 4;
+ if (key & KEYC_ESCAPE)
+ modifiers += 8;
/*
* If the key has no modifiers, return NULL and let it fall through to