forked from aniani/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 #3362) Also display the line number with ":verbose set".
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user