summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/menu.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2020-05-16 16:35:14 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2020-05-16 16:35:14 +0000
commit0fc5218039291b0f10328f67b5296bd535ba9bf1 (patch)
tree491fd92267e0fc8a357883c24fdc9d17cde2261b /usr.bin/tmux/menu.c
parent3b4499d12983b028284ad209e5bb2ca8388ccff8 (diff)
Separate key flags and modifiers, log key flags, make the "xterm" flag
more explicit and fix M- keys with a leading escape.
Diffstat (limited to 'usr.bin/tmux/menu.c')
-rw-r--r--usr.bin/tmux/menu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/menu.c b/usr.bin/tmux/menu.c
index fb673e7fa30..09a2d6b71d6 100644
--- a/usr.bin/tmux/menu.c
+++ b/usr.bin/tmux/menu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: menu.c,v 1.28 2020/05/16 15:38:14 nicm Exp $ */
+/* $OpenBSD: menu.c,v 1.29 2020/05/16 16:35:13 nicm Exp $ */
/*
* Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -81,7 +81,7 @@ menu_add_item(struct menu *menu, const struct menu_item *item,
return;
}
if (*s != '-' && item->key != KEYC_UNKNOWN && item->key != KEYC_NONE) {
- key = key_string_lookup_key(item->key);
+ key = key_string_lookup_key(item->key, 0);
xasprintf(&name, "%s#[default] #[align=right](%s)", s, key);
} else
xasprintf(&name, "%s", s);
@@ -226,7 +226,7 @@ menu_key_cb(struct client *c, struct key_event *event)
goto chosen;
}
}
- switch (event->key) {
+ switch (event->key & ~KEYC_MASK_FLAGS) {
case KEYC_UP:
case 'k':
if (old == -1)