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.
This commit is contained in:
Benno Schulenberg 2022-01-29 11:08:05 +01:00
parent d69cd759cb
commit 10eec2fe17

View File

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