aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/menu.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-01 21:02:59 +0800
committerGitHub <noreply@github.com>2022-07-01 21:02:59 +0800
commit2b1abe3c9d32fe02f8fffcd802a87adb1e15c569 (patch)
treeb4c1a647274f6cf3bf81c3c6254fdc3f995a39ac /src/nvim/menu.c
parent6486b0345a69c2bb134f00feacad75852ebeef7e (diff)
downloadrneovim-2b1abe3c9d32fe02f8fffcd802a87adb1e15c569.tar.gz
rneovim-2b1abe3c9d32fe02f8fffcd802a87adb1e15c569.tar.bz2
rneovim-2b1abe3c9d32fe02f8fffcd802a87adb1e15c569.zip
vim-patch:9.0.0015: with EXITFREE defined terminal menus are not cleared (#19187)
Problem: With EXITFREE defined terminal menus are not cleared. Solution: Also clear terminal menus. Remove condition that is always true. (closes vim/vim#10641) https://github.com/vim/vim/commit/79ae152697ed0dfa578cfac305d05021dec2a6bc
Diffstat (limited to 'src/nvim/menu.c')
-rw-r--r--src/nvim/menu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/menu.c b/src/nvim/menu.c
index 1c9a84bbbc..018c62d604 100644
--- a/src/nvim/menu.c
+++ b/src/nvim/menu.c
@@ -1496,11 +1496,10 @@ void execute_menu(const exarg_T *eap, vimmenu_T *menu, int mode_idx)
}
}
- if (idx == -1 || eap == NULL) {
+ if (idx == MENU_INDEX_INVALID || eap == NULL) {
idx = MENU_INDEX_NORMAL;
}
- assert(idx != MENU_INDEX_INVALID);
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