summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/menu.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2019-05-26 18:19:53 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2019-05-26 18:19:53 +0000
commitcd79cf4f753462ddbcba767c7b726340b63cba45 (patch)
treeb0b9a3ae26825b78007365e20b48030242283528 /usr.bin/tmux/menu.c
parentd42f75e5c0133d899df058f961447782d34b158a (diff)
Do not accept choice unless mouse has actually moved before.
Diffstat (limited to 'usr.bin/tmux/menu.c')
-rw-r--r--usr.bin/tmux/menu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/menu.c b/usr.bin/tmux/menu.c
index 4e7c1b5a4df..c906818e26b 100644
--- a/usr.bin/tmux/menu.c
+++ b/usr.bin/tmux/menu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: menu.c,v 1.6 2019/05/26 17:34:45 nicm Exp $ */
+/* $OpenBSD: menu.c,v 1.7 2019/05/26 18:19:52 nicm Exp $ */
/*
* Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -226,9 +226,9 @@ menu_key_cb(struct client *c, struct key_event *event)
}
return (0);
}
- md->choice = m->y - (md->py + 1);
if (MOUSE_RELEASE(m->b))
goto chosen;
+ md->choice = m->y - (md->py + 1);
if (md->choice != old)
c->flags |= CLIENT_REDRAWOVERLAY;
return (0);