forked from aniani/vim
patch 9.1.0073: Looping over modifier_keys_table unnecessarily
Problem: Looping over modifier_keys_table[] unnecessarily with only MOD_MASK_ALT or MOD_MASK_CMD, as modifier_keys_table[] only contains MOD_MASK_SHIFT and MOD_MASK_CTRL, and the loop won't do anything. Solution: Remove MOD_MASK_ALT and MOD_MASK_CMD from the condition. (zeertzjq) closes: #13963 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
609370392a
commit
0c989e4a3a
@@ -1130,11 +1130,7 @@ simplify_key(int key, int *modifiers)
|
||||
int key0;
|
||||
int key1;
|
||||
|
||||
if (!(*modifiers & (MOD_MASK_SHIFT | MOD_MASK_CTRL | MOD_MASK_ALT
|
||||
#ifdef FEAT_GUI_GTK
|
||||
| MOD_MASK_CMD
|
||||
#endif
|
||||
)))
|
||||
if (!(*modifiers & (MOD_MASK_SHIFT | MOD_MASK_CTRL)))
|
||||
return key;
|
||||
|
||||
// TAB is a special case
|
||||
|
Reference in New Issue
Block a user