mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -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:
@@ -5591,7 +5591,7 @@ call_user_expand_func(
|
||||
{
|
||||
int keep = 0;
|
||||
typval_T args[4];
|
||||
int save_current_SID = current_SID;
|
||||
sctx_T save_current_sctx = current_sctx;
|
||||
char_u *pat = NULL;
|
||||
void *ret;
|
||||
struct cmdline_info save_ccline;
|
||||
@@ -5621,12 +5621,12 @@ call_user_expand_func(
|
||||
save_ccline = ccline;
|
||||
ccline.cmdbuff = NULL;
|
||||
ccline.cmdprompt = NULL;
|
||||
current_SID = xp->xp_scriptID;
|
||||
current_sctx = xp->xp_script_ctx;
|
||||
|
||||
ret = user_expand_func(xp->xp_arg, 3, args);
|
||||
|
||||
ccline = save_ccline;
|
||||
current_SID = save_current_SID;
|
||||
current_sctx = save_current_sctx;
|
||||
if (ccline.cmdbuff != NULL)
|
||||
ccline.cmdbuff[ccline.cmdlen] = keep;
|
||||
|
||||
|
Reference in New Issue
Block a user