From c11da7ca88b3553cd6e9ecf09843e815fab43d73 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 1 Apr 2012 09:23:31 +0000 Subject: [PATCH] Only exit mouse mode on scroll wheel when actually reaching the end of the history, from James Nylen. --- window-copy.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/window-copy.c b/window-copy.c index 2f1c353c..517f4d49 100644 --- a/window-copy.c +++ b/window-copy.c @@ -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;