Karsten Hopp af9378
To: vim_dev@googlegroups.com
Karsten Hopp af9378
Subject: Patch 7.4.002
Karsten Hopp af9378
Fcc: outbox
Karsten Hopp af9378
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp af9378
Mime-Version: 1.0
Karsten Hopp af9378
Content-Type: text/plain; charset=UTF-8
Karsten Hopp af9378
Content-Transfer-Encoding: 8bit
Karsten Hopp af9378
------------
Karsten Hopp af9378
Karsten Hopp af9378
Patch 7.4b.002
Karsten Hopp af9378
Problem:    Pattern with two alternative look-behind matches does not match.
Karsten Hopp af9378
	    (Amadeus Demarzi)
Karsten Hopp af9378
Solution:   When comparing PIMs also compare their state ID to see if they are
Karsten Hopp af9378
	    different.
Karsten Hopp af9378
Files:	    src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok
Karsten Hopp af9378
Karsten Hopp af9378
Karsten Hopp af9378
*** ../vim-7.4.001/src/regexp_nfa.c	2013-08-14 12:05:54.000000000 +0200
Karsten Hopp af9378
--- src/regexp_nfa.c	2013-08-14 13:12:09.000000000 +0200
Karsten Hopp af9378
***************
Karsten Hopp af9378
*** 3782,3787 ****
Karsten Hopp af9378
--- 3782,3790 ----
Karsten Hopp af9378
      if (two_unused)
Karsten Hopp af9378
  	/* one is used and two is not: not equal */
Karsten Hopp af9378
  	return FALSE;
Karsten Hopp af9378
+     /* compare the state id */
Karsten Hopp af9378
+     if (one->state->id != two->state->id)
Karsten Hopp af9378
+ 	return FALSE;
Karsten Hopp af9378
      /* compare the position */
Karsten Hopp af9378
      if (REG_MULTI)
Karsten Hopp af9378
  	return one->end.pos.lnum == two->end.pos.lnum
Karsten Hopp af9378
*** ../vim-7.4.001/src/testdir/test64.in	2013-08-14 12:05:54.000000000 +0200
Karsten Hopp af9378
--- src/testdir/test64.in	2013-08-14 12:58:38.000000000 +0200
Karsten Hopp af9378
***************
Karsten Hopp af9378
*** 421,426 ****
Karsten Hopp af9378
--- 421,429 ----
Karsten Hopp af9378
  :call add(tl, [2, '\(foo\)\@<=\>', 'barfoo', '', 'foo'])
Karsten Hopp af9378
  :call add(tl, [2, '\(foo\)\@<=.*', 'foobar', 'bar', 'foo'])
Karsten Hopp af9378
  :"
Karsten Hopp af9378
+ :" complicated look-behind match
Karsten Hopp af9378
+ :call add(tl, [2, '\(r\@<=\|\w\@
Karsten Hopp af9378
+ :"
Karsten Hopp af9378
  :""""" \@>
Karsten Hopp af9378
  :call add(tl, [2, '\(a*\)\@>a', 'aaaa'])
Karsten Hopp af9378
  :call add(tl, [2, '\(a*\)\@>b', 'aaab', 'aaab', 'aaa'])
Karsten Hopp af9378
*** ../vim-7.4.001/src/testdir/test64.ok	2013-08-14 12:05:54.000000000 +0200
Karsten Hopp af9378
--- src/testdir/test64.ok	2013-08-14 13:14:09.000000000 +0200
Karsten Hopp af9378
***************
Karsten Hopp af9378
*** 974,979 ****
Karsten Hopp af9378
--- 974,982 ----
Karsten Hopp af9378
  OK 0 - \(foo\)\@<=.*
Karsten Hopp af9378
  OK 1 - \(foo\)\@<=.*
Karsten Hopp af9378
  OK 2 - \(foo\)\@<=.*
Karsten Hopp af9378
+ OK 0 - \(r\@<=\|\w\@
Karsten Hopp af9378
+ OK 1 - \(r\@<=\|\w\@
Karsten Hopp af9378
+ OK 2 - \(r\@<=\|\w\@
Karsten Hopp af9378
  OK 0 - \(a*\)\@>a
Karsten Hopp af9378
  OK 1 - \(a*\)\@>a
Karsten Hopp af9378
  OK 2 - \(a*\)\@>a
Karsten Hopp af9378
*** ../vim-7.4.001/src/version.c	2013-08-14 12:05:54.000000000 +0200
Karsten Hopp af9378
--- src/version.c	2013-08-14 13:13:45.000000000 +0200
Karsten Hopp af9378
***************
Karsten Hopp af9378
*** 729,730 ****
Karsten Hopp af9378
--- 729,732 ----
Karsten Hopp af9378
  {   /* Add new patch number below this line */
Karsten Hopp af9378
+ /**/
Karsten Hopp af9378
+     2,
Karsten Hopp af9378
  /**/
Karsten Hopp af9378
Karsten Hopp af9378
-- 
Karsten Hopp af9378
From "know your smileys":
Karsten Hopp af9378
 :-)-O	Smiling doctor with stethoscope
Karsten Hopp af9378
Karsten Hopp af9378
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp af9378
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp af9378
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp af9378
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///