comparison src/menu.c @ 32295:bea4ebf594c6 v9.0.1479

patch 9.0.1479: small source file problems; outdated list of distrib. files Commit: https://github.com/vim/vim/commit/f39d9e9dca443e42920066be3a98fd9780e4ed33 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 22 22:54:40 2023 +0100 patch 9.0.1479: small source file problems; outdated list of distrib. files Problem: Small source file problems; outdated list of distributed files. Solution: Small updates to source files and list of distributed files.
author Bram Moolenaar <Bram@vim.org>
date Sun, 23 Apr 2023 00:00:04 +0200
parents 238ca27dbfd2
children 161ae1985d81
comparison
equal deleted inserted replaced
32294:b2e8663e6dcc 32295:bea4ebf594c6
2316 #endif // FEAT_GUI_MSWIN && FEAT_TEAROFF 2316 #endif // FEAT_GUI_MSWIN && FEAT_TEAROFF
2317 2317
2318 /* 2318 /*
2319 * Execute "menu". Use by ":emenu" and the window toolbar. 2319 * Execute "menu". Use by ":emenu" and the window toolbar.
2320 * "eap" is NULL for the window toolbar. 2320 * "eap" is NULL for the window toolbar.
2321 * "mode_idx" specifies a MENU_INDEX_ value, use -1 to depend on the current 2321 * "mode_idx" specifies a MENU_INDEX_ value, use MENU_INDEX_INVALID to depend
2322 * state. 2322 * on the current state.
2323 */ 2323 */
2324 void 2324 void
2325 execute_menu(exarg_T *eap, vimmenu_T *menu, int mode_idx) 2325 execute_menu(exarg_T *eap, vimmenu_T *menu, int mode_idx)
2326 { 2326 {
2327 int idx = mode_idx; 2327 int idx = mode_idx;
2328 2328
2329 if (idx < 0) 2329 if (idx < 0)
2330 { 2330 {
2331 // Use the Insert mode entry when returning to Insert mode. 2331 // Use the Insert mode entry when returning to Insert mode.
2332 if (restart_edit && !current_sctx.sc_sid) 2332 if (restart_edit && current_sctx.sc_sid == 0)
2333 { 2333 {
2334 idx = MENU_INDEX_INSERT; 2334 idx = MENU_INDEX_INSERT;
2335 } 2335 }
2336 #ifdef FEAT_TERMINAL 2336 #ifdef FEAT_TERMINAL
2337 else if (term_use_loop()) 2337 else if (term_use_loop())
2511 void 2511 void
2512 ex_emenu(exarg_T *eap) 2512 ex_emenu(exarg_T *eap)
2513 { 2513 {
2514 vimmenu_T *menu; 2514 vimmenu_T *menu;
2515 char_u *arg = eap->arg; 2515 char_u *arg = eap->arg;
2516 int mode_idx = -1; 2516 int mode_idx = MENU_INDEX_INVALID;
2517 2517
2518 if (arg[0] && VIM_ISWHITE(arg[1])) 2518 if (arg[0] && VIM_ISWHITE(arg[1]))
2519 { 2519 {
2520 switch (arg[0]) 2520 switch (arg[0])
2521 { 2521 {