mirror of
https://github.com/neovim/neovim.git
synced 2025-09-20 10:18:18 +00:00
Merge #7593 'PVS static analysis fixes'
This commit is contained in:
@@ -1417,17 +1417,20 @@ void ex_emenu(exarg_T *eap)
|
||||
idx = MENU_INDEX_NORMAL;
|
||||
}
|
||||
|
||||
if (idx != MENU_INDEX_INVALID && menu->strings[idx] != NULL) {
|
||||
/* When executing a script or function execute the commands right now.
|
||||
* Otherwise put them in the typeahead buffer. */
|
||||
if (current_SID != 0)
|
||||
assert(idx != MENU_INDEX_INVALID);
|
||||
if (menu->strings[idx] != NULL) {
|
||||
// When executing a script or function execute the commands right now.
|
||||
// Otherwise put them in the typeahead buffer.
|
||||
if (current_SID != 0) {
|
||||
exec_normal_cmd(menu->strings[idx], menu->noremap[idx],
|
||||
menu->silent[idx]);
|
||||
else
|
||||
ins_typebuf(menu->strings[idx], menu->noremap[idx], 0,
|
||||
TRUE, menu->silent[idx]);
|
||||
} else
|
||||
menu->silent[idx]);
|
||||
} else {
|
||||
ins_typebuf(menu->strings[idx], menu->noremap[idx], 0, true,
|
||||
menu->silent[idx]);
|
||||
}
|
||||
} else {
|
||||
EMSG2(_("E335: Menu not defined for %s mode"), mode);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user