Karsten Hopp 3109f8
To: vim-dev@vim.org
Karsten Hopp 3109f8
Subject: Patch 7.1.270
Karsten Hopp 3109f8
Fcc: outbox
Karsten Hopp 3109f8
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 3109f8
Mime-Version: 1.0
Karsten Hopp 3109f8
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 3109f8
Content-Transfer-Encoding: 8bit
Karsten Hopp 3109f8
------------
Karsten Hopp 3109f8
Karsten Hopp 3109f8
Patch 7.1.270
Karsten Hopp 3109f8
Problem:    ":?foo?" matches in current line since patch 7.1.025. (A.Politz)
Karsten Hopp 3109f8
Solution:   Remove the SEARCH_START flag.
Karsten Hopp 3109f8
Files:	    src/ex_docmd.c, src/search.c
Karsten Hopp 3109f8
Karsten Hopp 3109f8
Karsten Hopp 3109f8
*** ../vim-7.1.269/src/ex_docmd.c	Tue Feb 26 21:29:06 2008
Karsten Hopp 3109f8
--- src/ex_docmd.c	Sun Mar  2 20:50:43 2008
Karsten Hopp 3109f8
***************
Karsten Hopp 3109f8
*** 3932,3939 ****
Karsten Hopp 3109f8
  				curwin->w_cursor.col = 0;
Karsten Hopp 3109f8
  			    searchcmdlen = 0;
Karsten Hopp 3109f8
  			    if (!do_search(NULL, c, cmd, 1L,
Karsten Hopp 3109f8
! 					SEARCH_HIS + SEARCH_MSG + SEARCH_START,
Karsten Hopp 3109f8
! 					NULL))
Karsten Hopp 3109f8
  			    {
Karsten Hopp 3109f8
  				curwin->w_cursor = pos;
Karsten Hopp 3109f8
  				cmd = NULL;
Karsten Hopp 3109f8
--- 3932,3938 ----
Karsten Hopp 3109f8
  				curwin->w_cursor.col = 0;
Karsten Hopp 3109f8
  			    searchcmdlen = 0;
Karsten Hopp 3109f8
  			    if (!do_search(NULL, c, cmd, 1L,
Karsten Hopp 3109f8
! 					       SEARCH_HIS | SEARCH_MSG, NULL))
Karsten Hopp 3109f8
  			    {
Karsten Hopp 3109f8
  				curwin->w_cursor = pos;
Karsten Hopp 3109f8
  				cmd = NULL;
Karsten Hopp 3109f8
***************
Karsten Hopp 3109f8
*** 3980,3987 ****
Karsten Hopp 3109f8
  				pos.col = 0;
Karsten Hopp 3109f8
  			    if (searchit(curwin, curbuf, &pos,
Karsten Hopp 3109f8
  					*cmd == '?' ? BACKWARD : FORWARD,
Karsten Hopp 3109f8
! 					(char_u *)"", 1L,
Karsten Hopp 3109f8
! 					SEARCH_MSG + SEARCH_START,
Karsten Hopp 3109f8
  						i, (linenr_T)0, NULL) != FAIL)
Karsten Hopp 3109f8
  				lnum = pos.lnum;
Karsten Hopp 3109f8
  			    else
Karsten Hopp 3109f8
--- 3979,3985 ----
Karsten Hopp 3109f8
  				pos.col = 0;
Karsten Hopp 3109f8
  			    if (searchit(curwin, curbuf, &pos,
Karsten Hopp 3109f8
  					*cmd == '?' ? BACKWARD : FORWARD,
Karsten Hopp 3109f8
! 					(char_u *)"", 1L, SEARCH_MSG,
Karsten Hopp 3109f8
  						i, (linenr_T)0, NULL) != FAIL)
Karsten Hopp 3109f8
  				lnum = pos.lnum;
Karsten Hopp 3109f8
  			    else
Karsten Hopp 3109f8
*** ../vim-7.1.269/src/search.c	Wed Feb 20 13:41:14 2008
Karsten Hopp 3109f8
--- src/search.c	Sun Mar  2 22:00:50 2008
Karsten Hopp 3109f8
***************
Karsten Hopp 3109f8
*** 538,544 ****
Karsten Hopp 3109f8
  	return FAIL;
Karsten Hopp 3109f8
      }
Karsten Hopp 3109f8
  
Karsten Hopp 3109f8
!     if (options & SEARCH_START)
Karsten Hopp 3109f8
  	extra_col = 0;
Karsten Hopp 3109f8
  #ifdef FEAT_MBYTE
Karsten Hopp 3109f8
      /* Watch out for the "col" being MAXCOL - 2, used in a closed fold. */
Karsten Hopp 3109f8
--- 538,547 ----
Karsten Hopp 3109f8
  	return FAIL;
Karsten Hopp 3109f8
      }
Karsten Hopp 3109f8
  
Karsten Hopp 3109f8
!     /* When not accepting a match at the start position set "extra_col" to a
Karsten Hopp 3109f8
!      * non-zero value.  Don't do that when starting at MAXCOL, since MAXCOL +
Karsten Hopp 3109f8
!      * 1 is zero. */
Karsten Hopp 3109f8
!     if ((options & SEARCH_START) || pos->col == MAXCOL)
Karsten Hopp 3109f8
  	extra_col = 0;
Karsten Hopp 3109f8
  #ifdef FEAT_MBYTE
Karsten Hopp 3109f8
      /* Watch out for the "col" being MAXCOL - 2, used in a closed fold. */
Karsten Hopp 3109f8
*** ../vim-7.1.269/src/version.c	Sun Mar  9 16:45:16 2008
Karsten Hopp 3109f8
--- src/version.c	Mon Mar 10 21:32:07 2008
Karsten Hopp 3109f8
***************
Karsten Hopp 3109f8
*** 668,669 ****
Karsten Hopp 3109f8
--- 668,671 ----
Karsten Hopp 3109f8
  {   /* Add new patch number below this line */
Karsten Hopp 3109f8
+ /**/
Karsten Hopp 3109f8
+     270,
Karsten Hopp 3109f8
  /**/
Karsten Hopp 3109f8
Karsten Hopp 3109f8
-- 
Karsten Hopp 3109f8
hundred-and-one symptoms of being an internet addict:
Karsten Hopp 3109f8
102. When filling out your driver's license application, you give
Karsten Hopp 3109f8
     your IP address.
Karsten Hopp 3109f8
Karsten Hopp 3109f8
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 3109f8
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 3109f8
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 3109f8
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///