Karsten Hopp 8261b4
To: vim_dev@googlegroups.com
Karsten Hopp 8261b4
Subject: Patch 7.4.050
Karsten Hopp 8261b4
Fcc: outbox
Karsten Hopp 8261b4
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 8261b4
Mime-Version: 1.0
Karsten Hopp 8261b4
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 8261b4
Content-Transfer-Encoding: 8bit
Karsten Hopp 8261b4
------------
Karsten Hopp 8261b4
Karsten Hopp 8261b4
Patch 7.4.050
Karsten Hopp 8261b4
Problem:    "gn" selects too much for the pattern "\d" when there are two
Karsten Hopp 8261b4
	    lines with a single digit. (Ryan Carney)
Karsten Hopp 8261b4
Solution:   Adjust the logic of is_one_char(). (Christian Brabandt)
Karsten Hopp 8261b4
Files:	    src/search.c, src/testdir/test53.in, src/testdir/test53.ok
Karsten Hopp 8261b4
Karsten Hopp 8261b4
Karsten Hopp 8261b4
*** ../vim-7.4.049/src/search.c	2013-08-14 17:45:25.000000000 +0200
Karsten Hopp 8261b4
--- src/search.c	2013-10-02 21:49:40.000000000 +0200
Karsten Hopp 8261b4
***************
Karsten Hopp 8261b4
*** 4680,4687 ****
Karsten Hopp 8261b4
  		&& regmatch.startpos[0].lnum == regmatch.endpos[0].lnum
Karsten Hopp 8261b4
  		&& regmatch.startpos[0].col == regmatch.endpos[0].col);
Karsten Hopp 8261b4
  
Karsten Hopp 8261b4
! 	if (!result && incl(&pos) == 0 && pos.col == regmatch.endpos[0].col)
Karsten Hopp 8261b4
! 	    result  = TRUE;
Karsten Hopp 8261b4
      }
Karsten Hopp 8261b4
  
Karsten Hopp 8261b4
      called_emsg |= save_called_emsg;
Karsten Hopp 8261b4
--- 4680,4687 ----
Karsten Hopp 8261b4
  		&& regmatch.startpos[0].lnum == regmatch.endpos[0].lnum
Karsten Hopp 8261b4
  		&& regmatch.startpos[0].col == regmatch.endpos[0].col);
Karsten Hopp 8261b4
  
Karsten Hopp 8261b4
! 	if (!result && inc(&pos) >= 0 && pos.col == regmatch.endpos[0].col)
Karsten Hopp 8261b4
! 	    result = TRUE;
Karsten Hopp 8261b4
      }
Karsten Hopp 8261b4
  
Karsten Hopp 8261b4
      called_emsg |= save_called_emsg;
Karsten Hopp 8261b4
*** ../vim-7.4.049/src/testdir/test53.in	2013-06-30 14:31:56.000000000 +0200
Karsten Hopp 8261b4
--- src/testdir/test53.in	2013-10-02 21:47:10.000000000 +0200
Karsten Hopp 8261b4
***************
Karsten Hopp 8261b4
*** 46,51 ****
Karsten Hopp 8261b4
--- 46,54 ----
Karsten Hopp 8261b4
  :set selection=exclusive
Karsten Hopp 8261b4
  $cgNmongoose?/i
Karsten Hopp 8261b4
  cgnj?
Karsten Hopp 8261b4
+ :" Make sure there is no other match y uppercase.
Karsten Hopp 8261b4
+ /?x59
Karsten Hopp 8261b4
+ gggnd
Karsten Hopp 8261b4
  :/^start:/,/^end:/wq! test.out
Karsten Hopp 8261b4
  ENDTEST
Karsten Hopp 8261b4
  
Karsten Hopp 8261b4
***************
Karsten Hopp 8261b4
*** 75,78 ****
Karsten Hopp 8261b4
--- 78,84 ----
Karsten Hopp 8261b4
  uniquepattern uniquepattern
Karsten Hopp 8261b4
  my very excellent mother just served us nachos
Karsten Hopp 8261b4
  for (i=0; i<=10; i++)
Karsten Hopp 8261b4
+ Y
Karsten Hopp 8261b4
+ text
Karsten Hopp 8261b4
+ Y
Karsten Hopp 8261b4
  end:
Karsten Hopp 8261b4
*** ../vim-7.4.049/src/testdir/test53.ok	2013-06-30 14:31:56.000000000 +0200
Karsten Hopp 8261b4
--- src/testdir/test53.ok	2013-10-02 21:47:34.000000000 +0200
Karsten Hopp 8261b4
***************
Karsten Hopp 8261b4
*** 27,30 ****
Karsten Hopp 8261b4
--- 27,33 ----
Karsten Hopp 8261b4
   uniquepattern
Karsten Hopp 8261b4
  my very excellent mongoose just served us nachos
Karsten Hopp 8261b4
  for (j=0; i<=10; i++)
Karsten Hopp 8261b4
+ 
Karsten Hopp 8261b4
+ text
Karsten Hopp 8261b4
+ Y
Karsten Hopp 8261b4
  end:
Karsten Hopp 8261b4
*** ../vim-7.4.049/src/version.c	2013-10-02 18:43:00.000000000 +0200
Karsten Hopp 8261b4
--- src/version.c	2013-10-02 21:51:34.000000000 +0200
Karsten Hopp 8261b4
***************
Karsten Hopp 8261b4
*** 740,741 ****
Karsten Hopp 8261b4
--- 740,743 ----
Karsten Hopp 8261b4
  {   /* Add new patch number below this line */
Karsten Hopp 8261b4
+ /**/
Karsten Hopp 8261b4
+     50,
Karsten Hopp 8261b4
  /**/
Karsten Hopp 8261b4
Karsten Hopp 8261b4
-- 
Karsten Hopp 8261b4
Why doesn't Tarzan have a beard?
Karsten Hopp 8261b4
Karsten Hopp 8261b4
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 8261b4
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 8261b4
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 8261b4
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///