1
0
forked from aniani/vim

updated for version 7.0005

This commit is contained in:
Bram Moolenaar
2004-07-03 16:05:59 +00:00
parent cfbc5ee48e
commit 592e0a2a1d
20 changed files with 739 additions and 365 deletions

View File

@@ -3974,6 +3974,7 @@ ExpandUserDefined(xp, regmatch, num_file, file)
char_u num[50];
garray_T ga;
int save_current_SID = current_SID;
struct cmdline_info save_ccline;
if (xp->xp_arg == NULL || xp->xp_arg[0] == '\0')
return FAIL;
@@ -3987,9 +3988,17 @@ ExpandUserDefined(xp, regmatch, num_file, file)
args[1] = ccline.cmdbuff;
args[2] = num;
/* Save the cmdline, we don't know what the function may do. */
save_ccline = ccline;
ccline.cmdbuff = NULL;
ccline.cmdprompt = NULL;
current_SID = xp->xp_scriptID;
all = call_vim_function(xp->xp_arg, 3, args, FALSE);
ccline = save_ccline;
current_SID = save_current_SID;
ccline.cmdbuff[ccline.cmdlen] = keep;
if (all == NULL)
return FAIL;