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