mirror of
https://github.com/neovim/neovim.git
synced 2025-09-20 10:18:18 +00:00
vim-patch:8.1.0362: cannot get the script line number when executing a function
Problem: Cannot get the script line number when executing a function.
Solution: Store the line number besides the script ID. (Ozaki Kiichi,
closes vim/vim#3362) Also display the line number with ":verbose set".
f29c1c6aa3
This commit is contained in:
@@ -1370,7 +1370,7 @@ void ex_emenu(exarg_T *eap)
|
||||
|
||||
/* Found the menu, so execute.
|
||||
* Use the Insert mode entry when returning to Insert mode. */
|
||||
if (((State & INSERT) || restart_edit) && !current_SID) {
|
||||
if (((State & INSERT) || restart_edit) && !current_sctx.sc_sid) {
|
||||
mode = (char_u *)"Insert";
|
||||
idx = MENU_INDEX_INSERT;
|
||||
} else if (State & CMDLINE) {
|
||||
@@ -1431,7 +1431,7 @@ void ex_emenu(exarg_T *eap)
|
||||
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) {
|
||||
if (current_sctx.sc_sid != 0) {
|
||||
exec_normal_cmd(menu->strings[idx], menu->noremap[idx],
|
||||
menu->silent[idx]);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user