diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-06-30 20:02:13 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-07-01 10:17:39 +0800 |
commit | 236947ab20b82417eb4f3f69dd46740f299b7fdf (patch) | |
tree | 3f20aa27e82f0cbd2696ac94e25d793352a568c7 /src/nvim/menu.c | |
parent | d81d8d454a151c60f4281c904e387661712b7984 (diff) | |
download | rneovim-236947ab20b82417eb4f3f69dd46740f299b7fdf.tar.gz rneovim-236947ab20b82417eb4f3f69dd46740f299b7fdf.tar.bz2 rneovim-236947ab20b82417eb4f3f69dd46740f299b7fdf.zip |
vim-patch:8.1.1274: after :unmenu can still execute the menu with :emenu
Problem: After :unmenu can still execute the menu with :emenu.
Solution: Do not execute a menu that was disabled for the specified mode.
https://github.com/vim/vim/commit/ce79353ace9e21238f13655089363cd23cbb6b32
Diffstat (limited to 'src/nvim/menu.c')
-rw-r--r-- | src/nvim/menu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/menu.c b/src/nvim/menu.c index dbe8e1b2fe..1c9a84bbbc 100644 --- a/src/nvim/menu.c +++ b/src/nvim/menu.c @@ -1501,7 +1501,7 @@ void execute_menu(const exarg_T *eap, vimmenu_T *menu, int mode_idx) } assert(idx != MENU_INDEX_INVALID); - if (menu->strings[idx] != NULL) { + if (menu->strings[idx] != NULL && (menu->modes & (1 << idx))) { // When executing a script or function execute the commands right now. // Also for the window toolbar // Otherwise put them in the typeahead buffer. |