From cd79cf4f753462ddbcba767c7b726340b63cba45 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 26 May 2019 18:19:53 +0000 Subject: Do not accept choice unless mouse has actually moved before. --- usr.bin/tmux/menu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin/tmux') 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 @@ -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); -- cgit v1.2.3