diff options
author | 2014-01-22 13:57:49 +0000 | |
---|---|---|
committer | 2014-01-22 13:57:49 +0000 | |
commit | 411e2066aa776f4dc8ba7f618ae6387f590b196d (patch) | |
tree | 5a55da87698073d8e4a6a3180857383b585f529b | |
parent | There's no reason to pass a netmask argument when doing a RTF_HOST (diff) | |
download | wireguard-openbsd-411e2066aa776f4dc8ba7f618ae6387f590b196d.tar.xz wireguard-openbsd-411e2066aa776f4dc8ba7f618ae6387f590b196d.zip |
Only exit copy mode at the bottom if no selection in progress, from
Benoit Pierre.
-rw-r--r-- | usr.bin/tmux/window-copy.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/tmux/window-copy.c b/usr.bin/tmux/window-copy.c index 59b11f4ed77..1bd9cbe5f7d 100644 --- a/usr.bin/tmux/window-copy.c +++ b/usr.bin/tmux/window-copy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-copy.c,v 1.98 2013/11/20 17:01:23 deraadt Exp $ */ +/* $OpenBSD: window-copy.c,v 1.99 2014/01/22 13:57:49 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -853,8 +853,12 @@ window_copy_mouse( } else if (m->wheel == MOUSE_WHEEL_DOWN) { for (i = 0; i < 5; i++) window_copy_cursor_down(wp, 1); - if (data->oy == 0) - goto reset_mode; + /* + * We reached the bottom, leave copy mode, + * but only if no selection is in progress. + */ + if (data->oy == 0 && !s->sel.flag) + goto reset_mode; } return; } |