summaryrefslogtreecommitdiffstats
path: root/src/menu.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2023-04-22 22:54:40 +0100
committerBram Moolenaar <Bram@vim.org>2023-04-22 22:54:40 +0100
commitf39d9e9dca443e42920066be3a98fd9780e4ed33 (patch)
treefc55b4f846fe60b7bb21613b26b796fba38eff1b /src/menu.c
parent71badf9547e8f89571b9a095183671cbb333d528 (diff)
patch 9.0.1479: small source file problems; outdated list of distrib. filesv9.0.1479
Problem: Small source file problems; outdated list of distributed files. Solution: Small updates to source files and list of distributed files.
Diffstat (limited to 'src/menu.c')
-rw-r--r--src/menu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/menu.c b/src/menu.c
index a543a5093e..04cd5f103c 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -2318,8 +2318,8 @@ gui_destroy_tearoffs_recurse(vimmenu_T *menu)
/*
* Execute "menu". Use by ":emenu" and the window toolbar.
* "eap" is NULL for the window toolbar.
- * "mode_idx" specifies a MENU_INDEX_ value, use -1 to depend on the current
- * state.
+ * "mode_idx" specifies a MENU_INDEX_ value, use MENU_INDEX_INVALID to depend
+ * on the current state.
*/
void
execute_menu(exarg_T *eap, vimmenu_T *menu, int mode_idx)
@@ -2329,7 +2329,7 @@ execute_menu(exarg_T *eap, vimmenu_T *menu, int mode_idx)
if (idx < 0)
{
// Use the Insert mode entry when returning to Insert mode.
- if (restart_edit && !current_sctx.sc_sid)
+ if (restart_edit && current_sctx.sc_sid == 0)
{
idx = MENU_INDEX_INSERT;
}
@@ -2513,7 +2513,7 @@ ex_emenu(exarg_T *eap)
{
vimmenu_T *menu;
char_u *arg = eap->arg;
- int mode_idx = -1;
+ int mode_idx = MENU_INDEX_INVALID;
if (arg[0] && VIM_ISWHITE(arg[1]))
{