diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-06-29 12:57:06 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-06-29 12:57:06 +0200 |
commit | 8f5c6f003ade1d481c4db0f2e2fffac209dce77c (patch) | |
tree | 08451eff36f69551b8507dcf07397c796d9c5f27 /src/ex_cmds2.c | |
parent | db91395312a02527ed973c8376d8e26e5b63ff53 (diff) |
updated for version 7.3.570v7.3.570
Problem: ":vimgrep" does not obey 'wildignore'.
Solution: Apply 'wildignore' and 'suffixes' to ":vimgrep". (Ingo Karkat)
Diffstat (limited to 'src/ex_cmds2.c')
-rw-r--r-- | src/ex_cmds2.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 5bc8242555..d3bf04fade 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -1850,22 +1850,28 @@ get_arglist(gap, str) #if defined(FEAT_QUICKFIX) || defined(FEAT_SYN_HL) || defined(PROTO) /* * Parse a list of arguments (file names), expand them and return in - * "fnames[fcountp]". + * "fnames[fcountp]". When "wig" is TRUE, removes files matching 'wildignore'. * Return FAIL or OK. */ int -get_arglist_exp(str, fcountp, fnamesp) +get_arglist_exp(str, fcountp, fnamesp, wig) char_u *str; int *fcountp; char_u ***fnamesp; + int wig; { garray_T ga; int i; if (get_arglist(&ga, str) == FAIL) return FAIL; - i = gen_expand_wildcards(ga.ga_len, (char_u **)ga.ga_data, - fcountp, fnamesp, EW_FILE|EW_NOTFOUND); + if (wig == TRUE) + i = expand_wildcards(ga.ga_len, (char_u **)ga.ga_data, + fcountp, fnamesp, EW_FILE|EW_NOTFOUND); + else + i = gen_expand_wildcards(ga.ga_len, (char_u **)ga.ga_data, + fcountp, fnamesp, EW_FILE|EW_NOTFOUND); + ga_clear(&ga); return i; } |