From df680d725751e0fe9eca4403c732ec1332d91d97 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 22 Jan 2014 13:57:49 +0000 Subject: [PATCH] Only exit copy mode at the bottom if no selection in progress, from Benoit Pierre. --- window-copy.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/window-copy.c b/window-copy.c index dd4f23fa..ddd5bf41 100644 --- a/window-copy.c +++ b/window-copy.c @@ -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; }