Karsten Hopp 9cb502
To: vim_dev@googlegroups.com
Karsten Hopp 9cb502
Subject: Patch 7.3.570
Karsten Hopp 9cb502
Fcc: outbox
Karsten Hopp 9cb502
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 9cb502
Mime-Version: 1.0
Karsten Hopp 9cb502
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 9cb502
Content-Transfer-Encoding: 8bit
Karsten Hopp 9cb502
------------
Karsten Hopp 9cb502
Karsten Hopp 9cb502
Patch 7.3.570
Karsten Hopp 9cb502
Problem:    ":vimgrep" does not obey 'wildignore'.
Karsten Hopp 9cb502
Solution:   Apply 'wildignore' and 'suffixes' to ":vimgrep". (Ingo Karkat)
Karsten Hopp 9cb502
Files:	    src/ex_cmds2.c, src/proto/ex_cmds2.pro, src/quickfix.c, src/spell.c
Karsten Hopp 9cb502
Karsten Hopp 9cb502
Karsten Hopp 9cb502
*** ../vim-7.3.569/src/ex_cmds2.c	2012-06-20 15:48:53.000000000 +0200
Karsten Hopp 9cb502
--- src/ex_cmds2.c	2012-06-29 12:43:34.000000000 +0200
Karsten Hopp 9cb502
***************
Karsten Hopp 9cb502
*** 1850,1871 ****
Karsten Hopp 9cb502
  #if defined(FEAT_QUICKFIX) || defined(FEAT_SYN_HL) || defined(PROTO)
Karsten Hopp 9cb502
  /*
Karsten Hopp 9cb502
   * Parse a list of arguments (file names), expand them and return in
Karsten Hopp 9cb502
!  * "fnames[fcountp]".
Karsten Hopp 9cb502
   * Return FAIL or OK.
Karsten Hopp 9cb502
   */
Karsten Hopp 9cb502
      int
Karsten Hopp 9cb502
! get_arglist_exp(str, fcountp, fnamesp)
Karsten Hopp 9cb502
      char_u	*str;
Karsten Hopp 9cb502
      int		*fcountp;
Karsten Hopp 9cb502
      char_u	***fnamesp;
Karsten Hopp 9cb502
  {
Karsten Hopp 9cb502
      garray_T	ga;
Karsten Hopp 9cb502
      int		i;
Karsten Hopp 9cb502
  
Karsten Hopp 9cb502
      if (get_arglist(&ga, str) == FAIL)
Karsten Hopp 9cb502
  	return FAIL;
Karsten Hopp 9cb502
!     i = gen_expand_wildcards(ga.ga_len, (char_u **)ga.ga_data,
Karsten Hopp 9cb502
! 				       fcountp, fnamesp, EW_FILE|EW_NOTFOUND);
Karsten Hopp 9cb502
      ga_clear(&ga);
Karsten Hopp 9cb502
      return i;
Karsten Hopp 9cb502
  }
Karsten Hopp 9cb502
--- 1850,1877 ----
Karsten Hopp 9cb502
  #if defined(FEAT_QUICKFIX) || defined(FEAT_SYN_HL) || defined(PROTO)
Karsten Hopp 9cb502
  /*
Karsten Hopp 9cb502
   * Parse a list of arguments (file names), expand them and return in
Karsten Hopp 9cb502
!  * "fnames[fcountp]".  When "wig" is TRUE, removes files matching 'wildignore'.
Karsten Hopp 9cb502
   * Return FAIL or OK.
Karsten Hopp 9cb502
   */
Karsten Hopp 9cb502
      int
Karsten Hopp 9cb502
! get_arglist_exp(str, fcountp, fnamesp, wig)
Karsten Hopp 9cb502
      char_u	*str;
Karsten Hopp 9cb502
      int		*fcountp;
Karsten Hopp 9cb502
      char_u	***fnamesp;
Karsten Hopp 9cb502
+     int		wig;
Karsten Hopp 9cb502
  {
Karsten Hopp 9cb502
      garray_T	ga;
Karsten Hopp 9cb502
      int		i;
Karsten Hopp 9cb502
  
Karsten Hopp 9cb502
      if (get_arglist(&ga, str) == FAIL)
Karsten Hopp 9cb502
  	return FAIL;
Karsten Hopp 9cb502
!     if (wig == TRUE)
Karsten Hopp 9cb502
! 	i = expand_wildcards(ga.ga_len, (char_u **)ga.ga_data,
Karsten Hopp 9cb502
! 					fcountp, fnamesp, EW_FILE|EW_NOTFOUND);
Karsten Hopp 9cb502
!     else
Karsten Hopp 9cb502
! 	i = gen_expand_wildcards(ga.ga_len, (char_u **)ga.ga_data,
Karsten Hopp 9cb502
! 					fcountp, fnamesp, EW_FILE|EW_NOTFOUND);
Karsten Hopp 9cb502
! 
Karsten Hopp 9cb502
      ga_clear(&ga);
Karsten Hopp 9cb502
      return i;
Karsten Hopp 9cb502
  }
Karsten Hopp 9cb502
*** ../vim-7.3.569/src/proto/ex_cmds2.pro	2011-05-19 18:26:34.000000000 +0200
Karsten Hopp 9cb502
--- src/proto/ex_cmds2.pro	2012-06-29 12:43:49.000000000 +0200
Karsten Hopp 9cb502
***************
Karsten Hopp 9cb502
*** 42,48 ****
Karsten Hopp 9cb502
  int check_fname __ARGS((void));
Karsten Hopp 9cb502
  int buf_write_all __ARGS((buf_T *buf, int forceit));
Karsten Hopp 9cb502
  int get_arglist __ARGS((garray_T *gap, char_u *str));
Karsten Hopp 9cb502
! int get_arglist_exp __ARGS((char_u *str, int *fcountp, char_u ***fnamesp));
Karsten Hopp 9cb502
  void set_arglist __ARGS((char_u *str));
Karsten Hopp 9cb502
  void check_arg_idx __ARGS((win_T *win));
Karsten Hopp 9cb502
  void ex_args __ARGS((exarg_T *eap));
Karsten Hopp 9cb502
--- 42,48 ----
Karsten Hopp 9cb502
  int check_fname __ARGS((void));
Karsten Hopp 9cb502
  int buf_write_all __ARGS((buf_T *buf, int forceit));
Karsten Hopp 9cb502
  int get_arglist __ARGS((garray_T *gap, char_u *str));
Karsten Hopp 9cb502
! int get_arglist_exp __ARGS((char_u *str, int *fcountp, char_u ***fnamesp, int wig));
Karsten Hopp 9cb502
  void set_arglist __ARGS((char_u *str));
Karsten Hopp 9cb502
  void check_arg_idx __ARGS((win_T *win));
Karsten Hopp 9cb502
  void ex_args __ARGS((exarg_T *eap));
Karsten Hopp 9cb502
*** ../vim-7.3.569/src/quickfix.c	2012-06-01 18:34:37.000000000 +0200
Karsten Hopp 9cb502
--- src/quickfix.c	2012-06-29 12:43:49.000000000 +0200
Karsten Hopp 9cb502
***************
Karsten Hopp 9cb502
*** 3189,3195 ****
Karsten Hopp 9cb502
  	    ;
Karsten Hopp 9cb502
  
Karsten Hopp 9cb502
      /* parse the list of arguments */
Karsten Hopp 9cb502
!     if (get_arglist_exp(p, &fcount, &fnames) == FAIL)
Karsten Hopp 9cb502
  	goto theend;
Karsten Hopp 9cb502
      if (fcount == 0)
Karsten Hopp 9cb502
      {
Karsten Hopp 9cb502
--- 3189,3195 ----
Karsten Hopp 9cb502
  	    ;
Karsten Hopp 9cb502
  
Karsten Hopp 9cb502
      /* parse the list of arguments */
Karsten Hopp 9cb502
!     if (get_arglist_exp(p, &fcount, &fnames, TRUE) == FAIL)
Karsten Hopp 9cb502
  	goto theend;
Karsten Hopp 9cb502
      if (fcount == 0)
Karsten Hopp 9cb502
      {
Karsten Hopp 9cb502
*** ../vim-7.3.569/src/spell.c	2012-06-01 17:49:51.000000000 +0200
Karsten Hopp 9cb502
--- src/spell.c	2012-06-29 12:43:49.000000000 +0200
Karsten Hopp 9cb502
***************
Karsten Hopp 9cb502
*** 8553,8559 ****
Karsten Hopp 9cb502
      }
Karsten Hopp 9cb502
  
Karsten Hopp 9cb502
      /* Expand all the remaining arguments (e.g., $VIMRUNTIME). */
Karsten Hopp 9cb502
!     if (get_arglist_exp(arg, &fcount, &fnames) == OK)
Karsten Hopp 9cb502
      {
Karsten Hopp 9cb502
  	mkspell(fcount, fnames, ascii, eap->forceit, FALSE);
Karsten Hopp 9cb502
  	FreeWild(fcount, fnames);
Karsten Hopp 9cb502
--- 8553,8559 ----
Karsten Hopp 9cb502
      }
Karsten Hopp 9cb502
  
Karsten Hopp 9cb502
      /* Expand all the remaining arguments (e.g., $VIMRUNTIME). */
Karsten Hopp 9cb502
!     if (get_arglist_exp(arg, &fcount, &fnames, FALSE) == OK)
Karsten Hopp 9cb502
      {
Karsten Hopp 9cb502
  	mkspell(fcount, fnames, ascii, eap->forceit, FALSE);
Karsten Hopp 9cb502
  	FreeWild(fcount, fnames);
Karsten Hopp 9cb502
*** ../vim-7.3.569/src/version.c	2012-06-29 12:54:32.000000000 +0200
Karsten Hopp 9cb502
--- src/version.c	2012-06-29 12:56:12.000000000 +0200
Karsten Hopp 9cb502
***************
Karsten Hopp 9cb502
*** 716,717 ****
Karsten Hopp 9cb502
--- 716,719 ----
Karsten Hopp 9cb502
  {   /* Add new patch number below this line */
Karsten Hopp 9cb502
+ /**/
Karsten Hopp 9cb502
+     570,
Karsten Hopp 9cb502
  /**/
Karsten Hopp 9cb502
Karsten Hopp 9cb502
-- 
Karsten Hopp 9cb502
hundred-and-one symptoms of being an internet addict:
Karsten Hopp 9cb502
70. ISDN lines are added to your house on a hourly basis
Karsten Hopp 9cb502
Karsten Hopp 9cb502
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 9cb502
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 9cb502
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 9cb502
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///