changeset 29344:5f0039383340 v9.0.0015

patch 9.0.0015: with EXITFREE defined terminal menus are not cleared Commit: https://github.com/vim/vim/commit/79ae152697ed0dfa578cfac305d05021dec2a6bc Author: zeertzjq <zeertzjq@outlook.com> Date: Fri Jul 1 12:13:15 2022 +0100 patch 9.0.0015: with EXITFREE defined terminal menus are not cleared Problem: With EXITFREE defined terminal menus are not cleared. Solution: Also clear terminal menus. Remove condition that is always true. (closes #10641)
author Bram Moolenaar <Bram@vim.org>
date Fri, 01 Jul 2022 13:15:04 +0200
parents a56121c09252
children ab6b4e105fa5
files src/alloc.c src/menu.c src/version.c
diffstat 3 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -402,6 +402,7 @@ free_all_mem(void)
 # ifdef FEAT_MENU
 	// Clear menus.
 	do_cmdline_cmd((char_u *)"aunmenu *");
+	do_cmdline_cmd((char_u *)"tlunmenu *");
 #  ifdef FEAT_MULTI_LANG
 	do_cmdline_cmd((char_u *)"menutranslate clear");
 #  endif
--- a/src/menu.c
+++ b/src/menu.c
@@ -2361,11 +2361,10 @@ execute_menu(exarg_T *eap, vimmenu_T *me
     }
 
     // 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.
--- a/src/version.c
+++ b/src/version.c
@@ -736,6 +736,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    15,
+/**/
     14,
 /**/
     13,