diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-06-19 21:46:52 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-06-19 21:46:52 +0200 |
commit | 20298ce679dbf21c07c8fe2161724a12424f1e69 (patch) | |
tree | d14bbcf9f30749d23b71ea0273963c51c34a99e9 /src/misc2.c | |
parent | 1e0b7b11db61bd906266d3174fee0bbaf20a101f (diff) | |
download | vim-git-20298ce679dbf21c07c8fe2161724a12424f1e69.tar.gz |
patch 8.2.1015: popup filter gets key with modifier prependedv8.2.1015
Problem: Popup filter gets key with modifier prepended when using
modifyOtherKeys.
Solution: Remove the shift modifier when it is included in the key, also
when the Alt or Meta modifier is used.
Diffstat (limited to 'src/misc2.c')
-rw-r--r-- | src/misc2.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/misc2.c b/src/misc2.c index 41b9f711e..649cb65c9 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -2929,9 +2929,11 @@ extract_modifiers(int key, int *modp, int simplify, int *did_simplify) if ((modifiers & MOD_MASK_SHIFT) && ASCII_ISALPHA(key)) { key = TOUPPER_ASC(key); - // With <C-S-a> and <A-S-a> we keep the shift modifier. - // With <S-a> and <S-A> we don't keep the shift modifier. - if (simplify || modifiers == MOD_MASK_SHIFT) + // With <C-S-a> we keep the shift modifier. + // With <S-a>, <A-S-a> and <S-A> we don't keep the shift modifier. + if (simplify || modifiers == MOD_MASK_SHIFT + || modifiers == (MOD_MASK_SHIFT | MOD_MASK_ALT) + || modifiers == (MOD_MASK_SHIFT | MOD_MASK_META)) modifiers &= ~MOD_MASK_SHIFT; } |