diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-02-04 06:42:47 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2024-02-04 06:46:09 +0800 |
commit | 60701f4fff8a45956f74df429b4361447ffe7f3d (patch) | |
tree | 0b4ffbf2ce66a680c55fc1d69cc4560d9300b279 | |
parent | c559ab0ae6bebd565862dd28b39947a07766846d (diff) | |
download | rneovim-60701f4fff8a45956f74df429b4361447ffe7f3d.tar.gz rneovim-60701f4fff8a45956f74df429b4361447ffe7f3d.tar.bz2 rneovim-60701f4fff8a45956f74df429b4361447ffe7f3d.zip |
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
https://github.com/vim/vim/commit/0c989e4a3ae50085aa8c6bed5d6701760191bc1d
-rw-r--r-- | src/nvim/keycodes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/keycodes.c b/src/nvim/keycodes.c index c910d0955a..44ddfbba00 100644 --- a/src/nvim/keycodes.c +++ b/src/nvim/keycodes.c @@ -400,7 +400,7 @@ int name_to_mod_mask(int c) int simplify_key(const int key, int *modifiers) 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; } |