From ee3254b6141af911f890ffe0066b771b08539e0d Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@telfort.nl>
Date: Thu, 10 Aug 2017 12:28:39 +0200
Subject: [PATCH] tweaks: simply set the proper scrolling mode, instead of
 imitating it

---
 src/winio.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/winio.c b/src/winio.c
index 766dbdf4..a66a4a31 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -3206,10 +3206,8 @@ void edit_refresh(void)
 #endif
 
     /* If the current line is out of view, get it back on screen. */
-    if (current_is_offscreen()) {
-	openfile->current_y = editwinrows - 1;
-	adjust_viewport((focusing || !ISSET(SMOOTH_SCROLL)) ? CENTERING : STATIONARY);
-    }
+    if (current_is_offscreen())
+	adjust_viewport((focusing || !ISSET(SMOOTH_SCROLL)) ? CENTERING : FLOWING);
 
     line = openfile->edittop;
 
-- 
GitLab