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.
master
Benno Schulenberg 2020-08-15 14:03:34 +02:00
parent 50b61bef6f
commit d09055db43
1 changed files with 1 additions and 1 deletions

View File

@ -226,7 +226,7 @@ void read_keys_from(WINDOW *win)
/* When taking verbatim input, pause a moment after receiving an ESC, /* When taking verbatim input, pause a moment after receiving an ESC,
* to give the keyboard some time to bring the next code to ncurses. */ * 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); napms(20);
while (TRUE) { while (TRUE) {