0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

updated for version 7.3.075

Problem:    Missing part of 'wildignorecase'
Solution:   Also adjust expand()
This commit is contained in:
Bram Moolenaar
2010-12-02 21:44:40 +01:00
parent bf9680e441
commit 005c3c27ee
2 changed files with 12 additions and 6 deletions

View File

@@ -9876,7 +9876,7 @@ f_expand(argvars, rettv)
char_u *s; char_u *s;
int len; int len;
char_u *errormsg; char_u *errormsg;
int flags = WILD_SILENT|WILD_USE_NL|WILD_LIST_NOTFOUND; int options = WILD_SILENT|WILD_USE_NL|WILD_LIST_NOTFOUND;
expand_T xpc; expand_T xpc;
int error = FALSE; int error = FALSE;
@@ -9894,12 +9894,14 @@ f_expand(argvars, rettv)
* for 'wildignore' and don't put matches for 'suffixes' at the end. */ * for 'wildignore' and don't put matches for 'suffixes' at the end. */
if (argvars[1].v_type != VAR_UNKNOWN if (argvars[1].v_type != VAR_UNKNOWN
&& get_tv_number_chk(&argvars[1], &error)) && get_tv_number_chk(&argvars[1], &error))
flags |= WILD_KEEP_ALL; options |= WILD_KEEP_ALL;
if (!error) if (!error)
{ {
ExpandInit(&xpc); ExpandInit(&xpc);
xpc.xp_context = EXPAND_FILES; xpc.xp_context = EXPAND_FILES;
rettv->vval.v_string = ExpandOne(&xpc, s, NULL, flags, WILD_ALL); if (p_wic)
options += WILD_ICASE;
rettv->vval.v_string = ExpandOne(&xpc, s, NULL, options, WILD_ALL);
} }
else else
rettv->vval.v_string = NULL; rettv->vval.v_string = NULL;
@@ -11672,7 +11674,7 @@ f_glob(argvars, rettv)
typval_T *argvars; typval_T *argvars;
typval_T *rettv; typval_T *rettv;
{ {
int flags = WILD_SILENT|WILD_USE_NL; int options = WILD_SILENT|WILD_USE_NL;
expand_T xpc; expand_T xpc;
int error = FALSE; int error = FALSE;
@@ -11680,14 +11682,16 @@ f_glob(argvars, rettv)
* for 'wildignore' and don't put matches for 'suffixes' at the end. */ * for 'wildignore' and don't put matches for 'suffixes' at the end. */
if (argvars[1].v_type != VAR_UNKNOWN if (argvars[1].v_type != VAR_UNKNOWN
&& get_tv_number_chk(&argvars[1], &error)) && get_tv_number_chk(&argvars[1], &error))
flags |= WILD_KEEP_ALL; options |= WILD_KEEP_ALL;
rettv->v_type = VAR_STRING; rettv->v_type = VAR_STRING;
if (!error) if (!error)
{ {
ExpandInit(&xpc); ExpandInit(&xpc);
xpc.xp_context = EXPAND_FILES; xpc.xp_context = EXPAND_FILES;
if (p_wic)
options += WILD_ICASE;
rettv->vval.v_string = ExpandOne(&xpc, get_tv_string(&argvars[0]), rettv->vval.v_string = ExpandOne(&xpc, get_tv_string(&argvars[0]),
NULL, flags, WILD_ALL); NULL, options, WILD_ALL);
} }
else else
rettv->vval.v_string = NULL; rettv->vval.v_string = NULL;

View File

@@ -714,6 +714,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
75,
/**/ /**/
74, 74,
/**/ /**/