diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-09-16 13:27:15 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-09-16 13:27:15 +0000 |
commit | a5a0fe45824d4d35e09b19310cb50afd67732f04 (patch) | |
tree | a8406f4d6b76eea9da3c7c96b47a82402e8bfbd6 /usr.bin/tmux/menu.c | |
parent | 8e00514a891f8abb61b34b3a53b0f17d309573a4 (diff) |
Change menu key bindings to Up and Down and also close it on any mouse
press if opened by key.
Diffstat (limited to 'usr.bin/tmux/menu.c')
-rw-r--r-- | usr.bin/tmux/menu.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/tmux/menu.c b/usr.bin/tmux/menu.c index 0e4e1f83797..6bb595a4ae7 100644 --- a/usr.bin/tmux/menu.c +++ b/usr.bin/tmux/menu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: menu.c,v 1.11 2019/07/09 12:44:47 nicm Exp $ */ +/* $OpenBSD: menu.c,v 1.12 2019/09/16 13:27:14 nicm Exp $ */ /* * Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -185,8 +185,11 @@ menu_key_cb(struct client *c, struct key_event *event) const char *name; if (KEYC_IS_MOUSE(event->key)) { - if (md->flags & MENU_NOMOUSE) + if (md->flags & MENU_NOMOUSE) { + if (MOUSE_BUTTONS(m->b) != 0) + return (1); return (0); + } if (m->x < md->px || m->x > md->px + 4 + menu->width || m->y < md->py + 1 || |