summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2014-01-22 13:57:50 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2014-01-22 13:57:50 +0000
commit080b0b839561300e190afa4f5042d3fd844e4309 (patch)
treee6c6a2b80ac0092e38567ec13d74b8bf398c098f /usr.bin/tmux
parente24b2688050774b10e2d95b187b581be48816e28 (diff)
Only exit copy mode at the bottom if no selection in progress, from
Benoit Pierre.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/window-copy.c10
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;
}