mirror of
https://github.com/vim/vim.git
synced 2025-10-18 07:54:29 -04:00
updated for version 7.1-233
This commit is contained in:
@@ -4655,7 +4655,7 @@ expand_shellcmd(filepat, num_file, file, flagsarg)
|
||||
static void * call_user_expand_func __ARGS((void *(*user_expand_func) __ARGS((char_u *, int, char_u **, int)), expand_T *xp, int *num_file, char_u ***file));
|
||||
|
||||
/*
|
||||
* call "user_expand_func()" to invoke a user defined VimL function and return
|
||||
* Call "user_expand_func()" to invoke a user defined VimL function and return
|
||||
* the result (either a string or a List).
|
||||
*/
|
||||
static void *
|
||||
@@ -4677,11 +4677,22 @@ call_user_expand_func(user_expand_func, xp, num_file, file)
|
||||
*num_file = 0;
|
||||
*file = NULL;
|
||||
|
||||
if (ccline.cmdbuff == NULL)
|
||||
{
|
||||
/* Completion from Insert mode, pass fake arguments. */
|
||||
keep = 0;
|
||||
sprintf((char *)num, "%d", STRLEN(xp->xp_pattern));
|
||||
args[1] = xp->xp_pattern;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Completion on the command line, pass real arguments. */
|
||||
keep = ccline.cmdbuff[ccline.cmdlen];
|
||||
ccline.cmdbuff[ccline.cmdlen] = 0;
|
||||
sprintf((char *)num, "%d", ccline.cmdpos);
|
||||
args[0] = xp->xp_pattern;
|
||||
args[1] = ccline.cmdbuff;
|
||||
}
|
||||
args[0] = xp->xp_pattern;
|
||||
args[2] = num;
|
||||
|
||||
/* Save the cmdline, we don't know what the function may do. */
|
||||
@@ -4694,7 +4705,7 @@ call_user_expand_func(user_expand_func, xp, num_file, file)
|
||||
|
||||
ccline = save_ccline;
|
||||
current_SID = save_current_SID;
|
||||
|
||||
if (ccline.cmdbuff != NULL)
|
||||
ccline.cmdbuff[ccline.cmdlen] = keep;
|
||||
|
||||
return ret;
|
||||
|
@@ -666,6 +666,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
233,
|
||||
/**/
|
||||
232,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user