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.
master
Benno Schulenberg 2020-06-03 10:24:42 +02:00
parent 506f617d5b
commit da43cc0959
1 changed files with 1 additions and 3 deletions

View File

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