nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit a2a00577cd151a05efc064410e06c21797422a1b
parent b92b9e5cac02ae478975ba27e39db8c7eff3d97b
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun, 14 Nov 2021 16:28:56 +0100

search: with --zero, do not obscure an occurrence on the bottom row

If there is a status-bar message and the cursor happens to be on the
bottom row of the screen (in hidden-interface mode), then scroll the
viewport one row down, to keep the cursor in view.

This addresses the second issue mentioned in commit 03637030.

(The issue was rereported in https://savannah.gnu.org/bugs/?61464.)

Diffstat:
Msrc/nano.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/nano.c b/src/nano.c @@ -2545,9 +2545,15 @@ int main(int argc, char **argv) if (refresh_needed && (LINES > 1 || lastmessage == VACUUM)) edit_refresh(); + else + place_the_cursor(); /* When there are no bars, redraw a relevant status message. */ if (ISSET(ZERO) && lastmessage > HUSH) { + if (openfile->current_y == editwinrows - 1 && LINES > 1) { + edit_scroll(FORWARD); + edit_refresh(); + } redrawwin(bottomwin); wnoutrefresh(bottomwin); }