nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 10eec2fe17ae4c94f9de891f193e6b92c0606ed8
parent d69cd759cb0d2ed77aad6d8aa6bca76fe27981e0
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sat, 29 Jan 2022 11:08:05 +0100

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.

Diffstat:
Msrc/winio.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git 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);