aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/menu.c')
-rw-r--r--src/nvim/menu.c2
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.