diff --git a/src/winio.c b/src/winio.c index 2ebbe5f1..640c0538 100644 --- a/src/winio.c +++ b/src/winio.c @@ -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)