From 8aea8625be8da2110b37ba832f3b829fc0d7066d Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Thu, 18 Nov 2021 12:22:27 +0100 Subject: [PATCH] replacing: keep the spotlighted occurrence in view, also with --zero Also when adjusting the viewport, after the cursor has gone offscreen (by toggling the help lines, for example), should the SHIM be applied. This fixes https://savannah.gnu.org/bugs/?61503. Bug existed since commit 03637030 from last week. --- src/winio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/winio.c b/src/winio.c index 58979981..f6c406db 100644 --- a/src/winio.c +++ b/src/winio.c @@ -3465,7 +3465,7 @@ void adjust_viewport(update_type manner) else if (manner == CENTERING) goal = editwinrows / 2; else if (!current_is_above_screen()) - goal = editwinrows - 1; + goal = editwinrows - 1 - SHIM; openfile->edittop = openfile->current; #ifndef NANO_TINY