comparison src/misc2.c @ 20927:9328feafbbf5 v8.2.1015

patch 8.2.1015: popup filter gets key with modifier prepended Commit: https://github.com/vim/vim/commit/20298ce679dbf21c07c8fe2161724a12424f1e69 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jun 19 21:46:52 2020 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Fri, 19 Jun 2020 22:00:04 +0200
parents d9a2e5dcfd9f
children d64520bfafa0
comparison
equal deleted inserted replaced
20926:6ef0f635ce16 20927:9328feafbbf5
2927 if (!(modifiers & MOD_MASK_CMD)) 2927 if (!(modifiers & MOD_MASK_CMD))
2928 #endif 2928 #endif
2929 if ((modifiers & MOD_MASK_SHIFT) && ASCII_ISALPHA(key)) 2929 if ((modifiers & MOD_MASK_SHIFT) && ASCII_ISALPHA(key))
2930 { 2930 {
2931 key = TOUPPER_ASC(key); 2931 key = TOUPPER_ASC(key);
2932 // With <C-S-a> and <A-S-a> we keep the shift modifier. 2932 // With <C-S-a> we keep the shift modifier.
2933 // With <S-a> and <S-A> we don't keep the shift modifier. 2933 // With <S-a>, <A-S-a> and <S-A> we don't keep the shift modifier.
2934 if (simplify || modifiers == MOD_MASK_SHIFT) 2934 if (simplify || modifiers == MOD_MASK_SHIFT
2935 || modifiers == (MOD_MASK_SHIFT | MOD_MASK_ALT)
2936 || modifiers == (MOD_MASK_SHIFT | MOD_MASK_META))
2935 modifiers &= ~MOD_MASK_SHIFT; 2937 modifiers &= ~MOD_MASK_SHIFT;
2936 } 2938 }
2937 2939
2938 // <C-H> and <C-h> mean the same thing, always use "H" 2940 // <C-H> and <C-h> mean the same thing, always use "H"
2939 if ((modifiers & MOD_MASK_CTRL) && ASCII_ISALPHA(key)) 2941 if ((modifiers & MOD_MASK_CTRL) && ASCII_ISALPHA(key))