Karsten Hopp 1cd6cc
To: vim_dev@googlegroups.com
Karsten Hopp 1cd6cc
Subject: Patch 7.3.850
Karsten Hopp 1cd6cc
Fcc: outbox
Karsten Hopp 1cd6cc
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 1cd6cc
Mime-Version: 1.0
Karsten Hopp 1cd6cc
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 1cd6cc
Content-Transfer-Encoding: 8bit
Karsten Hopp 1cd6cc
------------
Karsten Hopp 1cd6cc
Karsten Hopp 1cd6cc
Patch 7.3.850
Karsten Hopp 1cd6cc
Problem:    ":vimgrep //" matches everywhere.
Karsten Hopp 1cd6cc
Solution:   Make it use the previous search pattern. (David Bürgin)
Karsten Hopp 1cd6cc
Files:	    runtime/doc/quickfix.txt, src/quickfix.c
Karsten Hopp 1cd6cc
Karsten Hopp 1cd6cc
Karsten Hopp 1cd6cc
*** ../vim-7.3.849/runtime/doc/quickfix.txt	2010-08-15 21:57:19.000000000 +0200
Karsten Hopp 1cd6cc
--- runtime/doc/quickfix.txt	2013-03-07 16:17:39.000000000 +0100
Karsten Hopp 1cd6cc
***************
Karsten Hopp 1cd6cc
*** 563,568 ****
Karsten Hopp 1cd6cc
--- 574,581 ----
Karsten Hopp 1cd6cc
  			'ignorecase' applies.  To overrule it put |/\c| in the
Karsten Hopp 1cd6cc
  			pattern to ignore case or |/\C| to match case.
Karsten Hopp 1cd6cc
  			'smartcase' is not used.
Karsten Hopp 1cd6cc
+ 			If {pattern} is empty (e.g. // is specified), the last
Karsten Hopp 1cd6cc
+ 			used search pattern is used. |last-pattern|
Karsten Hopp 1cd6cc
  
Karsten Hopp 1cd6cc
  			When a number is put before the command this is used
Karsten Hopp 1cd6cc
  			as the maximum number of matches to find.  Use
Karsten Hopp 1cd6cc
*** ../vim-7.3.849/src/quickfix.c	2012-12-12 15:55:16.000000000 +0100
Karsten Hopp 1cd6cc
--- src/quickfix.c	2013-03-07 16:21:17.000000000 +0100
Karsten Hopp 1cd6cc
***************
Karsten Hopp 1cd6cc
*** 3179,3185 ****
Karsten Hopp 1cd6cc
  	EMSG(_(e_invalpat));
Karsten Hopp 1cd6cc
  	goto theend;
Karsten Hopp 1cd6cc
      }
Karsten Hopp 1cd6cc
!     regmatch.regprog = vim_regcomp(s, RE_MAGIC);
Karsten Hopp 1cd6cc
      if (regmatch.regprog == NULL)
Karsten Hopp 1cd6cc
  	goto theend;
Karsten Hopp 1cd6cc
      regmatch.rmm_ic = p_ic;
Karsten Hopp 1cd6cc
--- 3179,3198 ----
Karsten Hopp 1cd6cc
  	EMSG(_(e_invalpat));
Karsten Hopp 1cd6cc
  	goto theend;
Karsten Hopp 1cd6cc
      }
Karsten Hopp 1cd6cc
! 
Karsten Hopp 1cd6cc
!     if (s != NULL && *s == NUL)
Karsten Hopp 1cd6cc
!     {
Karsten Hopp 1cd6cc
! 	/* Pattern is empty, use last search pattern. */
Karsten Hopp 1cd6cc
! 	if (last_search_pat() == NULL)
Karsten Hopp 1cd6cc
! 	{
Karsten Hopp 1cd6cc
! 	    EMSG(_(e_noprevre));
Karsten Hopp 1cd6cc
! 	    goto theend;
Karsten Hopp 1cd6cc
! 	}
Karsten Hopp 1cd6cc
! 	regmatch.regprog = vim_regcomp(last_search_pat(), RE_MAGIC);
Karsten Hopp 1cd6cc
!     }
Karsten Hopp 1cd6cc
!     else
Karsten Hopp 1cd6cc
! 	regmatch.regprog = vim_regcomp(s, RE_MAGIC);
Karsten Hopp 1cd6cc
! 
Karsten Hopp 1cd6cc
      if (regmatch.regprog == NULL)
Karsten Hopp 1cd6cc
  	goto theend;
Karsten Hopp 1cd6cc
      regmatch.rmm_ic = p_ic;
Karsten Hopp 1cd6cc
*** ../vim-7.3.849/src/version.c	2013-03-07 16:08:31.000000000 +0100
Karsten Hopp 1cd6cc
--- src/version.c	2013-03-07 16:16:26.000000000 +0100
Karsten Hopp 1cd6cc
***************
Karsten Hopp 1cd6cc
*** 730,731 ****
Karsten Hopp 1cd6cc
--- 730,733 ----
Karsten Hopp 1cd6cc
  {   /* Add new patch number below this line */
Karsten Hopp 1cd6cc
+ /**/
Karsten Hopp 1cd6cc
+     850,
Karsten Hopp 1cd6cc
  /**/
Karsten Hopp 1cd6cc
Karsten Hopp 1cd6cc
-- 
Karsten Hopp 1cd6cc
The technology involved in making anything invisible is so infinitely
Karsten Hopp 1cd6cc
complex that nine hundred and ninety-nine billion, nine hundred and
Karsten Hopp 1cd6cc
ninety-nine million, nine hundred and ninety-nine thousand, nine hundred
Karsten Hopp 1cd6cc
and ninety-nine times out of a trillion it is much simpler and more
Karsten Hopp 1cd6cc
effective just to take the thing away and do without it.
Karsten Hopp 1cd6cc
		-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
Karsten Hopp 1cd6cc
Karsten Hopp 1cd6cc
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 1cd6cc
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 1cd6cc
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 1cd6cc
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///