nano

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

commit 42c7bfcf8af5dc3d11703cc4286064b368ff04b6
parent e67d1bfeb8ac1ccefb2ded1a85c3058ad3fd20f6
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon, 11 Apr 2022 10:24:17 +0200

verbatim: with --zero, keep cursor in viewport when it was on bottom row

This fixes https://savannah.gnu.org/bugs/?62285.

Bug existed since version 6.0, since --zero was introduced.

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

diff --git a/src/text.c b/src/text.c @@ -2997,6 +2997,13 @@ void do_verbatim_input(void) size_t count = 1; char *bytes; +#ifndef NANO_TINY + /* When barless and with cursor on bottom row, make room for the feedback. */ + if (ISSET(ZERO) && openfile->current_y == editwinrows - 1 && LINES > 1) { + edit_scroll(FORWARD); + edit_refresh(); + } +#endif /* TRANSLATORS: Shown when the next keystroke will be inserted verbatim. */ statusline(INFO, _("Verbatim Input")); place_the_cursor();