nano

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

commit da43cc095940eb4e08452fa7ce29322b2d110e95
parent 506f617d5bab72b9a3cc07144ed8ce90d555365c
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Wed,  3 Jun 2020 10:24:42 +0200

display: reposition the cursor after an error message also in a help text

A help text is contained in a normal buffer (since quite a while now),
so cursor placement should work like in a regular edit window.

Also, remove an unneeded switching on of the cursor -- it is already on
as nano is waiting for keyboard input.

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

Bug existed since version 3.2, commit 10d9742c, since --showcursor
shows the cursor also in the help viewer.

Diffstat:
Msrc/winio.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/winio.c b/src/winio.c @@ -836,10 +836,8 @@ int parse_escape_sequence(WINDOW *win, int kbinput) statusline(ALERT, _("Unknown sequence")); suppress_cursorpos = FALSE; lastmessage = HUSH; - if (currmenu == MMAIN) { + if (currmenu == MMAIN || currmenu == MHELP) place_the_cursor(); - curs_set(1); - } } return retval;