From f65d41a30aabe328d753deb2edf0ec1d3af03487 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 8 Jul 2015 13:43:32 +0100 Subject: [PATCH] Fix scrolling down hiding the cursor with scrolloff == 0 --- src/window.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/window.cc b/src/window.cc index 24a02cff7..5396f6629 100644 --- a/src/window.cc +++ b/src/window.cc @@ -133,7 +133,7 @@ static LineCount adapt_view_pos(LineCount line, LineCount offset, if (line - offset < view_pos) return std::max(0_line, line - offset); else if (line + offset >= view_pos + view_size) - return std::max(0_line, line + offset - view_size); + return std::max(0_line, line + offset - view_size + 1); return view_pos; }