0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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 #3362)  Also display the line number with ":verbose set".
This commit is contained in:
Bram Moolenaar
2018-09-10 21:05:02 +02:00
parent 6b0b83f768
commit f29c1c6aa3
24 changed files with 716 additions and 562 deletions

View File

@@ -3677,7 +3677,8 @@ do_map(
mp->m_mode = mode;
#ifdef FEAT_EVAL
mp->m_expr = expr;
mp->m_script_ID = current_SID;
mp->m_script_ctx = current_sctx;
mp->m_script_ctx.sc_lnum += sourcing_lnum;
#endif
did_it = TRUE;
}
@@ -3783,7 +3784,8 @@ do_map(
mp->m_mode = mode;
#ifdef FEAT_EVAL
mp->m_expr = expr;
mp->m_script_ID = current_SID;
mp->m_script_ctx = current_sctx;
mp->m_script_ctx.sc_lnum += sourcing_lnum;
#endif
/* add the new entry in front of the abbrlist or maphash[] list */
@@ -4097,7 +4099,7 @@ showmap(
}
#ifdef FEAT_EVAL
if (p_verbose > 0)
last_set_msg(mp->m_script_ID);
last_set_msg(mp->m_script_ctx);
#endif
out_flush(); /* show one line at a time */
}