jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.002

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