Blame SOURCES/7.4.100

22c937
To: vim_dev@googlegroups.com
22c937
Subject: Patch 7.4.100
22c937
Fcc: outbox
22c937
From: Bram Moolenaar <Bram@moolenaar.net>
22c937
Mime-Version: 1.0
22c937
Content-Type: text/plain; charset=UTF-8
22c937
Content-Transfer-Encoding: 8bit
22c937
------------
22c937
22c937
Patch 7.4.100
22c937
Problem:    NFA regexp doesn't handle backreference correctly. (Ryuichi
22c937
	    Hayashida, Urtica Dioica)
22c937
Solution:   Always add NFA_SKIP, also when it already exists at the start
22c937
	    position.
22c937
Files:      src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok
22c937
22c937
22c937
*** ../vim-7.4.099/src/regexp_nfa.c	2013-10-06 15:46:06.000000000 +0200
22c937
--- src/regexp_nfa.c	2013-11-21 15:58:58.000000000 +0100
22c937
***************
22c937
*** 4278,4284 ****
22c937
  	     * endless loop for "\(\)*" */
22c937
  
22c937
  	default:
22c937
! 	    if (state->lastlist[nfa_ll_index] == l->id)
22c937
  	    {
22c937
  		/* This state is already in the list, don't add it again,
22c937
  		 * unless it is an MOPEN that is used for a backreference or
22c937
--- 4278,4284 ----
22c937
  	     * endless loop for "\(\)*" */
22c937
  
22c937
  	default:
22c937
! 	    if (state->lastlist[nfa_ll_index] == l->id && state->c != NFA_SKIP)
22c937
  	    {
22c937
  		/* This state is already in the list, don't add it again,
22c937
  		 * unless it is an MOPEN that is used for a backreference or
22c937
*** ../vim-7.4.099/src/testdir/test64.in	2013-09-25 18:16:34.000000000 +0200
22c937
--- src/testdir/test64.in	2013-11-21 15:58:19.000000000 +0100
22c937
***************
22c937
*** 406,411 ****
22c937
--- 406,412 ----
22c937
  :call add(tl, [2, '^.*\.\(.*\)/.\+\(\1\)\@
22c937
  :call add(tl, [2, '^.*\.\(.*\)/.\+\(\1\)\@<=$', 'foo.bat/foo.bat', 'foo.bat/foo.bat', 'bat', 'bat'])
22c937
  :call add(tl, [2, '\\\@
22c937
+ :call add(tl, [2, '^\(a*\)\1$', 'aaaaaaaa', 'aaaaaaaa', 'aaaa'])
22c937
  :"
22c937
  :"""" Look-behind with limit
22c937
  :call add(tl, [2, '<\@<=span.', 'xxspanxx
22c937
*** ../vim-7.4.099/src/testdir/test64.ok	2013-09-25 18:16:34.000000000 +0200
22c937
--- src/testdir/test64.ok	2013-11-21 15:59:04.000000000 +0100
22c937
***************
22c937
*** 944,949 ****
22c937
--- 944,952 ----
22c937
  OK 0 - \\\@
22c937
  OK 1 - \\\@
22c937
  OK 2 - \\\@
22c937
+ OK 0 - ^\(a*\)\1$
22c937
+ OK 1 - ^\(a*\)\1$
22c937
+ OK 2 - ^\(a*\)\1$
22c937
  OK 0 - <\@<=span.
22c937
  OK 1 - <\@<=span.
22c937
  OK 2 - <\@<=span.
22c937
*** ../vim-7.4.099/src/version.c	2013-11-21 14:39:58.000000000 +0100
22c937
--- src/version.c	2013-11-21 16:02:27.000000000 +0100
22c937
***************
22c937
*** 740,741 ****
22c937
--- 740,743 ----
22c937
  {   /* Add new patch number below this line */
22c937
+ /**/
22c937
+     100,
22c937
  /**/
22c937
22c937
-- 
22c937
Sometimes you can protect millions of dollars in your budget simply by buying
22c937
a bag of cookies, dropping it on the budget anylyst's desk, and saying
22c937
something deeply personal such as "How was your weekend, big guy?"
22c937
				(Scott Adams - The Dilbert principle)
22c937
22c937
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
22c937
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
22c937
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
22c937
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///