From da43cc095940eb4e08452fa7ce29322b2d110e95 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Wed, 3 Jun 2020 10:24:42 +0200 Subject: [PATCH] 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. --- src/winio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/winio.c b/src/winio.c index 7f8aff74..a2fefde4 100644 --- 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;