replacing: keep the spotlighting, also after toggling the help lines

The spotlighting should only be dropped when in the main menu, like in
the code thirty lines up, where 'timed' became TRUE only for MMAIN.

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

Bug existed since version 5.8, commit 3f340836.
master
Benno Schulenberg 2021-10-29 10:21:09 +02:00
parent 256a0d670e
commit 8762e04631
1 changed files with 4 additions and 2 deletions

View File

@ -250,8 +250,10 @@ void read_keys_from(WINDOW *win)
#ifndef NANO_TINY
/* Cancel the highlighting of a search match, if there still is one. */
refresh_needed |= spotlighted;
spotlighted = FALSE;
if (currmenu == MMAIN) {
refresh_needed |= spotlighted;
spotlighted = FALSE;
}
/* If we got a SIGWINCH, get out as the win argument is no longer valid. */
if (input == KEY_WINCH)