From 10eec2fe17ae4c94f9de891f193e6b92c0606ed8 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sat, 29 Jan 2022 11:08:05 +0100 Subject: [PATCH] input: suppress any spotlighting when there are more keycodes waiting Because doing the spotlighting after those extra keycodes have been handled will most likely spotlight the wrong piece of text. Also, if those keycodes hadn't arrived early, the first of them would have cancelled the spotlighting. This fixes https://savannah.gnu.org/bugs/?61962. Bug existed since version 5.8, commit 3f340836. --- src/winio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/winio.c b/src/winio.c index b774f3a6..1b93c0b3 100644 --- a/src/winio.c +++ b/src/winio.c @@ -341,6 +341,9 @@ void implant(const char *string) * code, or ERR if the keystroke buffer is still empty. */ int get_input(WINDOW *win) { + if (waiting_codes) + spotlighted = FALSE; + if (waiting_codes == 0 && win != NULL) read_keys_from(win);