1
0
forked from aniani/vim

patch 9.0.1276: some mappings with Meta and Shift do not work

Problem:    Some mappings with Meta and Shift do not work.
Solution:   Apply the Shift modifier to the key. (issue #11913)
This commit is contained in:
Bram Moolenaar
2023-02-03 12:28:07 +00:00
parent 78012f55fa
commit 4be18e77ff
3 changed files with 33 additions and 8 deletions

View File

@@ -5343,6 +5343,12 @@ handle_key_with_modifier(
int key = trail == 'u' ? arg[0] : arg[2];
int modifiers = decode_modifiers(arg[1]);
// Some terminals do not apply the Shift modifier to the key. To make
// mappings consistent we do it here. TODO: support more keys.
if ((modifiers & MOD_MASK_SHIFT) && key >= 'a' && key <= 'z')
key += 'A' - 'a';
return put_key_modifiers_in_typebuf(key, modifiers,
csi_len, offset, buf, bufsize, buflen);
}