]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.3.570 v7.3.570
authorBram Moolenaar <Bram@vim.org>
Fri, 29 Jun 2012 10:57:06 +0000 (12:57 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 29 Jun 2012 10:57:06 +0000 (12:57 +0200)
Problem:    ":vimgrep" does not obey 'wildignore'.
Solution:   Apply 'wildignore' and 'suffixes' to ":vimgrep". (Ingo Karkat)

src/ex_cmds2.c
src/proto/ex_cmds2.pro
src/quickfix.c
src/spell.c
src/version.c

index 5bc82425551bb80ddf10113c01d74da40f38b236..d3bf04fade022bafa189987d5f62c417e05e796b 100644 (file)
@@ -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;
 }
index dc3bb790bb6141f200ff623e4aeccf59547b6531..e4406d161ab351eec516da1dc4b16a8fa904f86e 100644 (file)
@@ -42,7 +42,7 @@ int check_changed_any __ARGS((int hidden));
 int check_fname __ARGS((void));
 int buf_write_all __ARGS((buf_T *buf, int forceit));
 int get_arglist __ARGS((garray_T *gap, char_u *str));
-int get_arglist_exp __ARGS((char_u *str, int *fcountp, char_u ***fnamesp));
+int get_arglist_exp __ARGS((char_u *str, int *fcountp, char_u ***fnamesp, int wig));
 void set_arglist __ARGS((char_u *str));
 void check_arg_idx __ARGS((win_T *win));
 void ex_args __ARGS((exarg_T *eap));
index bbcebe4e2949c068fd47496d0b95b782d641d2ea..a1c4fe5c55aad19cad8a68609d93b26f1e49a225 100644 (file)
@@ -3189,7 +3189,7 @@ ex_vimgrep(eap)
            ;
 
     /* parse the list of arguments */
-    if (get_arglist_exp(p, &fcount, &fnames) == FAIL)
+    if (get_arglist_exp(p, &fcount, &fnames, TRUE) == FAIL)
        goto theend;
     if (fcount == 0)
     {
index f0f258a7c14ed269cabae47a02de799b20d257e9..ea47b1b2f88ad4d0c24fa539811205673d16a886 100644 (file)
@@ -8553,7 +8553,7 @@ ex_mkspell(eap)
     }
 
     /* Expand all the remaining arguments (e.g., $VIMRUNTIME). */
-    if (get_arglist_exp(arg, &fcount, &fnames) == OK)
+    if (get_arglist_exp(arg, &fcount, &fnames, FALSE) == OK)
     {
        mkspell(fcount, fnames, ascii, eap->forceit, FALSE);
        FreeWild(fcount, fnames);
index 95e576638d638a8baac8d0bfc7a7ed514a0a6c91..e60a4bed52e56368a51ac823c8b3cbdd7ebd80d3 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    570,
 /**/
     569,
 /**/