diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-09-10 21:05:02 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-09-10 21:05:02 +0200 |
commit | f29c1c6aa3f365c025890fab5fb9efbe88eb1761 (patch) | |
tree | 3cd43ee75a7e0fbdce4902426512ae804b1c7ff0 /src/term.c | |
parent | 6b0b83f768cf536b34ce4d3f2de6bf62324229aa (diff) | |
download | vim-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/term.c')
-rw-r--r-- | src/term.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/term.c b/src/term.c index cede4b894..b2e2b0381 100644 --- a/src/term.c +++ b/src/term.c @@ -6128,7 +6128,7 @@ replace_termcodes( */ if (STRNICMP(src, "<SID>", 5) == 0) { - if (current_SID <= 0) + if (current_sctx.sc_sid <= 0) EMSG(_(e_usingsid)); else { @@ -6136,7 +6136,8 @@ replace_termcodes( result[dlen++] = K_SPECIAL; result[dlen++] = (int)KS_EXTRA; result[dlen++] = (int)KE_SNR; - sprintf((char *)result + dlen, "%ld", (long)current_SID); + sprintf((char *)result + dlen, "%ld", + (long)current_sctx.sc_sid); dlen += (int)STRLEN(result + dlen); result[dlen++] = '_'; continue; |