0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 9.0.1287: with the Kitty key protocl Esc with NumLock cannot be mapped

Problem:    With the Kitty key protocl Esc with NumLock cannot be mapped.
Solution:   Also use K_ESC when there is a modifier. (closes #11811)
This commit is contained in:
Bram Moolenaar
2023-02-06 17:46:37 +00:00
parent 546933f497
commit 0261e3978e
2 changed files with 7 additions and 0 deletions

View File

@@ -5349,6 +5349,11 @@ handle_key_with_modifier(
if ((modifiers & MOD_MASK_SHIFT) && key >= 'a' && key <= 'z') if ((modifiers & MOD_MASK_SHIFT) && key >= 'a' && key <= 'z')
key += 'A' - 'a'; key += 'A' - 'a';
// Putting Esc in the buffer creates ambiguity, it can be the start of an
// escape sequence. Use K_ESC to avoid that.
if (key == ESC)
key = K_ESC;
return put_key_modifiers_in_typebuf(key, modifiers, return put_key_modifiers_in_typebuf(key, modifiers,
csi_len, offset, buf, bufsize, buflen); csi_len, offset, buf, bufsize, buflen);
} }

View File

@@ -695,6 +695,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1287,
/**/ /**/
1286, 1286,
/**/ /**/