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.
master
Benno Schulenberg 2021-11-18 12:22:27 +01:00
parent 931bf96c1d
commit 8aea8625be
1 changed files with 1 additions and 1 deletions

View File

@ -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