jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.020

1fa1ff
To: vim_dev@googlegroups.com
1fa1ff
Subject: Patch 7.4.020
1fa1ff
Fcc: outbox
1fa1ff
From: Bram Moolenaar <Bram@moolenaar.net>
1fa1ff
Mime-Version: 1.0
1fa1ff
Content-Type: text/plain; charset=UTF-8
1fa1ff
Content-Transfer-Encoding: 8bit
1fa1ff
------------
1fa1ff
1fa1ff
Patch 7.4.020
1fa1ff
Problem:    NFA engine matches too much with \@>. (John McGowan)
1fa1ff
Solution:   When a whole pattern match is found stop searching.
1fa1ff
Files:	    src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok
1fa1ff
1fa1ff
1fa1ff
*** ../vim-7.4.019/src/regexp_nfa.c	2013-08-25 17:01:36.000000000 +0200
1fa1ff
--- src/regexp_nfa.c	2013-09-05 15:59:44.000000000 +0200
1fa1ff
***************
1fa1ff
*** 5322,5328 ****
1fa1ff
  		log_subsexpr(m);
1fa1ff
  #endif
1fa1ff
  		nfa_match = TRUE;
1fa1ff
! 		break;
1fa1ff
  
1fa1ff
  	    case NFA_START_INVISIBLE:
1fa1ff
  	    case NFA_START_INVISIBLE_FIRST:
1fa1ff
--- 5322,5331 ----
1fa1ff
  		log_subsexpr(m);
1fa1ff
  #endif
1fa1ff
  		nfa_match = TRUE;
1fa1ff
! 		/* See comment above at "goto nextchar". */
1fa1ff
! 		if (nextlist->n == 0)
1fa1ff
! 		    clen = 0;
1fa1ff
! 		goto nextchar;
1fa1ff
  
1fa1ff
  	    case NFA_START_INVISIBLE:
1fa1ff
  	    case NFA_START_INVISIBLE_FIRST:
1fa1ff
*** ../vim-7.4.019/src/testdir/test64.in	2013-08-14 13:31:03.000000000 +0200
1fa1ff
--- src/testdir/test64.in	2013-09-05 15:35:44.000000000 +0200
1fa1ff
***************
1fa1ff
*** 427,432 ****
1fa1ff
--- 427,433 ----
1fa1ff
  :""""" \@>
1fa1ff
  :call add(tl, [2, '\(a*\)\@>a', 'aaaa'])
1fa1ff
  :call add(tl, [2, '\(a*\)\@>b', 'aaab', 'aaab', 'aaa'])
1fa1ff
+ :call add(tl, [2, '^\(.\{-}b\)\@>.', '  abcbd', '  abc', '  ab'])
1fa1ff
  :" TODO: BT engine does not restore submatch after failure
1fa1ff
  :call add(tl, [1, '\(a*\)\@>a\|a\+', 'aaaa', 'aaaa'])
1fa1ff
  :"
1fa1ff
*** ../vim-7.4.019/src/testdir/test64.ok	2013-08-14 13:31:03.000000000 +0200
1fa1ff
--- src/testdir/test64.ok	2013-09-05 16:03:34.000000000 +0200
1fa1ff
***************
1fa1ff
*** 983,988 ****
1fa1ff
--- 983,991 ----
1fa1ff
  OK 0 - \(a*\)\@>b
1fa1ff
  OK 1 - \(a*\)\@>b
1fa1ff
  OK 2 - \(a*\)\@>b
1fa1ff
+ OK 0 - ^\(.\{-}b\)\@>.
1fa1ff
+ OK 1 - ^\(.\{-}b\)\@>.
1fa1ff
+ OK 2 - ^\(.\{-}b\)\@>.
1fa1ff
  OK 0 - \(a*\)\@>a\|a\+
1fa1ff
  OK 2 - \(a*\)\@>a\|a\+
1fa1ff
  OK 0 - \_[^8-9]\+
1fa1ff
*** ../vim-7.4.019/src/version.c	2013-09-05 13:50:49.000000000 +0200
1fa1ff
--- src/version.c	2013-09-05 16:04:32.000000000 +0200
1fa1ff
***************
1fa1ff
*** 740,741 ****
1fa1ff
--- 740,743 ----
1fa1ff
  {   /* Add new patch number below this line */
1fa1ff
+ /**/
1fa1ff
+     20,
1fa1ff
  /**/
1fa1ff
1fa1ff
-- 
1fa1ff
hundred-and-one symptoms of being an internet addict:
1fa1ff
173. You keep tracking down the email addresses of all your friends
1fa1ff
     (even childhood friends).
1fa1ff
1fa1ff
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
1fa1ff
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
1fa1ff
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
1fa1ff
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///