summaryrefslogtreecommitdiffstats
path: root/src/buffer.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/buffer.c
parent6b0b83f768cf536b34ce4d3f2de6bf62324229aa (diff)
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/buffer.c')
-rw-r--r--src/buffer.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/buffer.c b/src/buffer.c
index dcff94ba8b..0bf6aa9125 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5412,7 +5412,7 @@ chk_modeline(
char_u *save_sourcing_name;
linenr_T save_sourcing_lnum;
#ifdef FEAT_EVAL
- scid_T save_SID;
+ sctx_T save_current_sctx;
#endif
prev = -1;
@@ -5497,12 +5497,13 @@ chk_modeline(
if (*s != NUL) /* skip over an empty "::" */
{
#ifdef FEAT_EVAL
- save_SID = current_SID;
- current_SID = SID_MODELINE;
+ save_current_sctx = current_sctx;
+ current_sctx.sc_sid = SID_MODELINE;
+ current_sctx.sc_lnum = 0;
#endif
retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags);
#ifdef FEAT_EVAL
- current_SID = save_SID;
+ current_sctx = save_current_sctx;
#endif
if (retval == FAIL) /* stop if error found */
break;