summaryrefslogtreecommitdiff
path: root/src/getchar.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-09-10 21:05:02 +0200
committerBram Moolenaar <Bram@vim.org>2018-09-10 21:05:02 +0200
commitf29c1c6aa3f365c025890fab5fb9efbe88eb1761 (patch)
tree3cd43ee75a7e0fbdce4902426512ae804b1c7ff0 /src/getchar.c
parent6b0b83f768cf536b34ce4d3f2de6bf62324229aa (diff)
downloadvim-git-f29c1c6aa3f365c025890fab5fb9efbe88eb1761.tar.gz
patch 8.1.0362: cannot get the script line number when executing a functionv8.1.0362
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".
Diffstat (limited to 'src/getchar.c')
-rw-r--r--src/getchar.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/getchar.c b/src/getchar.c
index 496e33fa8..cc8b344e1 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -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 */
}