lkundrak / rpms / vim

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