diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/memory.c | 1 | ||||
-rw-r--r-- | src/nvim/menu.c | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/memory.c b/src/nvim/memory.c index 3bb33f5c48..4d5cf047f9 100644 --- a/src/nvim/memory.c +++ b/src/nvim/memory.c @@ -687,6 +687,7 @@ void free_all_mem(void) // Clear menus. do_cmdline_cmd("aunmenu *"); + do_cmdline_cmd("tlunmenu *"); do_cmdline_cmd("menutranslate clear"); // Clear mappings, abbreviations, breakpoints. 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 |