mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 14:08:32 +00:00
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: vim/vim#13963
0c989e4a3a
This commit is contained in:
@@ -400,7 +400,7 @@ int name_to_mod_mask(int c)
|
|||||||
int simplify_key(const int key, int *modifiers)
|
int simplify_key(const int key, int *modifiers)
|
||||||
FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL
|
FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL
|
||||||
{
|
{
|
||||||
if (!(*modifiers & (MOD_MASK_SHIFT | MOD_MASK_CTRL | MOD_MASK_ALT))) {
|
if (!(*modifiers & (MOD_MASK_SHIFT | MOD_MASK_CTRL))) {
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user