verbatim: insert the full code sequence when <Alt+Backspace> is pressed
(This could lead to unwanted behavior when the user wants to enter
a literal escape character (0x1B) while the input is somehow getting
stalled, because then a command keystroke after the M-V <Esc> would
get inserted verbatim too, instead of getting acted upon. But that
is a small price to pay for getting the correct behavior for both
M-V M-Bsp and M-V M-Enter.)
This fixes https://savannah.gnu.org/bugs/?58909.
Bug existed since version 2.6.3, commit 08c51cfd
,
but also occurred erratically beforehand.
master
parent
5a6a74fe70
commit
cdd6882541
|
@ -1420,9 +1420,9 @@ int *parse_verbatim_kbinput(WINDOW *win, size_t *count)
|
|||
|
||||
free(kbinput);
|
||||
|
||||
/* If this is an iTerm/Eterm/rxvt double escape, take both Escapes. */
|
||||
if (key_buffer_len > 3 && *key_buffer == ESC_CODE &&
|
||||
key_buffer[1] == ESC_CODE && key_buffer[2] == '[')
|
||||
/* In case of an escape, take also a second code, as it might be another
|
||||
* escape (on iTerm2/rxvt) or a control code (for M-Bsp and M-Enter). */
|
||||
if (key_buffer_len > 1 && *key_buffer == ESC_CODE)
|
||||
*count = 2;
|
||||
|
||||
return get_input(NULL, *count);
|
||||
|
|
Loading…
Reference in New Issue