summaryrefslogtreecommitdiff
path: root/src/term.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-06-19 21:46:52 +0200
committerBram Moolenaar <Bram@vim.org>2020-06-19 21:46:52 +0200
commit20298ce679dbf21c07c8fe2161724a12424f1e69 (patch)
treed14bbcf9f30749d23b71ea0273963c51c34a99e9 /src/term.c
parent1e0b7b11db61bd906266d3174fee0bbaf20a101f (diff)
downloadvim-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/term.c')
-rw-r--r--src/term.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/term.c b/src/term.c
index c4ca33e32..1556c2eec 100644
--- a/src/term.c
+++ b/src/term.c
@@ -4772,11 +4772,14 @@ handle_key_with_modifier(
// Some keys already have Shift included, pass them as
// normal keys. Not when Ctrl is also used, because <C-H>
// and <C-S-H> are different.
- if (modifiers == MOD_MASK_SHIFT
+ // Also for <A-S-a> and <M-S-a>.
+ if ((modifiers == MOD_MASK_SHIFT
+ || modifiers == (MOD_MASK_SHIFT | MOD_MASK_ALT)
+ || modifiers == (MOD_MASK_SHIFT | MOD_MASK_META))
&& ((key >= '@' && key <= 'Z')
|| key == '^' || key == '_'
|| (key >= '{' && key <= '~')))
- modifiers = 0;
+ modifiers &= ~MOD_MASK_SHIFT;
// When used with Ctrl we always make a letter upper case,
// so that mapping <C-H> and <C-h> are the same. Typing