From 4b7b04bf599f79cdae9cd3ec5c86ac9d8e5fd48d Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 28 Oct 2015 00:01:25 +0000 Subject: [PATCH] Fix mouse scrolling up stopping at line 2 Fixes #448 --- src/input_handler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input_handler.cc b/src/input_handler.cc index 11cf161b..1b98fb19 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -134,7 +134,7 @@ private: auto clamp_line = [&](LineCount line) { return clamp(line, 0_line, line_count-1); }; auto min_coord = buffer.offset_coord(clamp_line(win_pos.line + scrolloff.line), win_pos.column); - auto max_coord = buffer.offset_coord(clamp_line(win_pos.line + win_dim.line - scrolloff.line), win_pos.column); + auto max_coord = buffer.offset_coord(clamp_line(win_pos.line + win_dim.line - 1 - scrolloff.line), win_pos.column); selections = SelectionList{buffer, clamp(cursor, min_coord, max_coord)};