summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2012-04-01 09:23:32 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2012-04-01 09:23:32 +0000
commit11283db1ed64caf259602a7fb5033eb0eb8315e9 (patch)
treef35d8e4e78aa6972dd73e019a2087fc5c7be965d /usr.bin
parent2d5035fc6a85e0772ebfdbd0ac68214b19308509 (diff)
Only exit mouse mode on scroll wheel when actually reaching the end of
the history, from James Nylen.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/window-copy.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/tmux/window-copy.c b/usr.bin/tmux/window-copy.c
index bfec3fdbd8e..78788b7a549 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.78 2012/03/17 21:40:53 nicm Exp $ */
+/* $OpenBSD: window-copy.c,v 1.79 2012/04/01 09:23:31 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -822,7 +822,7 @@ window_copy_mouse(
{
struct window_copy_mode_data *data = wp->modedata;
struct screen *s = &data->screen;
- u_int i, old_cy;
+ u_int i;
if (m->x >= screen_size_x(s))
return;
@@ -835,10 +835,9 @@ window_copy_mouse(
for (i = 0; i < 5; i++)
window_copy_cursor_up(wp, 0);
} else if ((m->b & MOUSE_BUTTON) == MOUSE_2) {
- old_cy = data->cy;
for (i = 0; i < 5; i++)
window_copy_cursor_down(wp, 0);
- if (old_cy == data->cy)
+ if (data->oy == 0)
goto reset_mode;
}
return;