diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-06-20 14:43:23 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-06-20 14:43:23 +0200 |
commit | ef6746f637adbdb6860b4fa0266c43c49fa498bc (patch) | |
tree | bc6c972c44330f8abab831c728f535326d35aaa8 /src/term.c | |
parent | 280b0dc815a31b99dafc384baa415072e5f2bec1 (diff) | |
download | vim-git-ef6746f637adbdb6860b4fa0266c43c49fa498bc.tar.gz |
patch 8.2.1019: mapping <M-S-a> does not work in the GUIv8.2.1019
Problem: Mapping <M-S-a> does not work in the GUI.
Solution: Move the logic to remove the shift modifier to
may_remove_shift_modifier() and also use it in the GUI.
Diffstat (limited to 'src/term.c')
-rw-r--r-- | src/term.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/term.c b/src/term.c index 1556c2eec..3bda87ccc 100644 --- a/src/term.c +++ b/src/term.c @@ -4769,17 +4769,8 @@ handle_key_with_modifier( modifiers = decode_modifiers(arg[1]); - // 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. - // 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 &= ~MOD_MASK_SHIFT; + // May remove the shift modifier if it's already included in the key. + modifiers = may_remove_shift_modifier(modifiers, key); // When used with Ctrl we always make a letter upper case, // so that mapping <C-H> and <C-h> are the same. Typing |