9c34900
To: vim-dev@vim.org
9c34900
Subject: Patch 7.1.238
9c34900
Fcc: outbox
9c34900
From: Bram Moolenaar <Bram@moolenaar.net>
9c34900
Mime-Version: 1.0
9c34900
Content-Type: text/plain; charset=ISO-8859-1
9c34900
Content-Transfer-Encoding: 8bit
9c34900
------------
9c34900
9c34900
Patch 7.1.238
9c34900
Problem:    Using the 'c' flag with searchpair() may cause it to fail.  Using
9c34900
	    the 'r' flag doesn't work when 'wrapscan' is set.  (A.Politz)
9c34900
Solution:   Only use the 'c' flag for the first search, not for repeating.
9c34900
	    When using 'r' imply 'W'. (Antony Scriven)
9c34900
Files:	    src/eval.c
9c34900
9c34900
9c34900
*** ../vim-7.1.237/src/eval.c	Sat Jan 12 16:45:25 2008
9c34900
--- src/eval.c	Tue Jan 22 11:42:28 2008
9c34900
***************
9c34900
*** 14189,14194 ****
9c34900
--- 14189,14198 ----
9c34900
  	goto theend;
9c34900
      }
9c34900
  
9c34900
+     /* Using 'r' implies 'W', otherwise it doesn't work. */
9c34900
+     if (flags & SP_REPEAT)
9c34900
+ 	p_ws = FALSE;
9c34900
+ 
9c34900
      /* Optional fifth argument: skip expression */
9c34900
      if (argvars[3].v_type == VAR_UNKNOWN
9c34900
  	    || argvars[4].v_type == VAR_UNKNOWN)
9c34900
***************
9c34900
*** 14344,14349 ****
9c34900
--- 14348,14356 ----
9c34900
  		incl(&pos;;
9c34900
  	}
9c34900
  	foundpos = pos;
9c34900
+ 
9c34900
+ 	/* clear the start flag to avoid getting stuck here */
9c34900
+ 	options &= ~SEARCH_START;
9c34900
  
9c34900
  	/* If the skip pattern matches, ignore this match. */
9c34900
  	if (*skip != NUL)
9c34900
*** ../vim-7.1.237/src/version.c	Tue Jan 22 11:06:06 2008
9c34900
--- src/version.c	Tue Jan 22 11:57:28 2008
9c34900
***************
9c34900
*** 668,669 ****
9c34900
--- 668,671 ----
9c34900
  {   /* Add new patch number below this line */
9c34900
+ /**/
9c34900
+     238,
9c34900
  /**/
9c34900
9c34900
-- 
9c34900
To keep milk from turning sour: Keep it in the cow.
9c34900
9c34900
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
9c34900
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
9c34900
\\\        download, build and distribute -- http://www.A-A-P.org        ///
9c34900
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///