0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 9.0.0974: even when Esc is encoded a timeout is used

Problem:    Even when Esc is encoded a timeout is used.
Solution:   Use K_ESC when an encoded Esc is found.
This commit is contained in:
Bram Moolenaar
2022-11-29 20:33:20 +00:00
parent 064fd67e6a
commit dffa6ea85c
4 changed files with 33 additions and 2 deletions

View File

@@ -1765,6 +1765,12 @@ vgetc(void)
}
c = TO_SPECIAL(c2, c);
// K_ESC is used to avoid ambiguity with the single Esc
// character that might be the start of an escape sequence.
// Convert it back to a single Esc here.
if (c == K_ESC)
c = ESC;
#if defined(FEAT_GUI_MSWIN) && defined(FEAT_MENU) && defined(FEAT_TEAROFF)
// Handle K_TEAROFF here, the caller of vgetc() doesn't need to
// know that a menu was torn off
@@ -3913,6 +3919,12 @@ getcmdkeycmd(
continue;
}
c1 = TO_SPECIAL(c1, c2);
// K_ESC is used to avoid ambiguity with the single Esc character
// that might be the start of an escape sequence. Convert it back
// to a single Esc here.
if (c1 == K_ESC)
c1 = ESC;
}
if (c1 == Ctrl_V)
{