forked from aniani/vim
patch 8.2.1015: popup filter gets key with modifier prepended
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.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user