summaryrefslogtreecommitdiffstats
path: root/src/menu.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-01 12:13:15 +0100
committerBram Moolenaar <Bram@vim.org>2022-07-01 12:13:15 +0100
commit79ae152697ed0dfa578cfac305d05021dec2a6bc (patch)
tree3df65276f11979b8b35c33dcde4c2525a6d76815 /src/menu.c
parent9610f94510220c783328e1857af87a6ae7bc20b4 (diff)
patch 9.0.0015: with EXITFREE defined terminal menus are not clearedv9.0.0015
Problem: With EXITFREE defined terminal menus are not cleared. Solution: Also clear terminal menus. Remove condition that is always true. (closes #10641)
Diffstat (limited to 'src/menu.c')
-rw-r--r--src/menu.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/menu.c b/src/menu.c
index a588674226..bfad016adb 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -2361,11 +2361,10 @@ execute_menu(exarg_T *eap, vimmenu_T *menu, int mode_idx)
}
// For the WinBar menu always use the Normal mode menu.
- if (idx == -1 || eap == NULL)
+ if (idx == MENU_INDEX_INVALID || eap == NULL)
idx = MENU_INDEX_NORMAL;
- if (idx != MENU_INDEX_INVALID && menu->strings[idx] != NULL
- && (menu->modes & (1 << idx)))
+ 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.