nano

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

commit d09055db4367c6726a4fbf92518b2e96cc9bb99e
parent 50b61bef6f41778b0e42796e618820ac228a219a
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sat, 15 Aug 2020 14:03:34 +0200

input: dawdle after an ESC also when --rawsequences is used

When keypad() is set to FALSE, like for verbatim input, ncurses is
not waiting its fifty milliseconds after an ESC to see if another
code will follow it, so nano itself will have to pause a little.

Otherwise 'solitary' could get set to TRUE when in fact the ESC
is followed very closely by another code.

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

Bug existed since version 2.6.2, commit f2150d3f.

Diffstat:
Msrc/winio.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/winio.c b/src/winio.c @@ -226,7 +226,7 @@ void read_keys_from(WINDOW *win) /* When taking verbatim input, pause a moment after receiving an ESC, * to give the keyboard some time to bring the next code to ncurses. */ - if (linger_after_escape && input == ESC_CODE) + if (input == ESC_CODE && (linger_after_escape || ISSET(RAW_SEQUENCES))) napms(20); while (TRUE) {