]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.002 v7.4.002
authorBram Moolenaar <Bram@vim.org>
Wed, 14 Aug 2013 11:34:25 +0000 (13:34 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 14 Aug 2013 11:34:25 +0000 (13:34 +0200)
Problem:    Pattern with two alternative look-behind matches does not match.
            (Amadeus Demarzi)
Solution:   When comparing PIMs also compare their state ID to see if they are
            different.

src/regexp_nfa.c
src/testdir/test64.in
src/testdir/test64.ok
src/version.c

index 0e172c8ca12634268593e30d527df596c14e1b96..203d9ff64ad17ae5ad94ea246fcc9306e2967391 100644 (file)
@@ -3782,6 +3782,9 @@ pim_equal(one, two)
     if (two_unused)
        /* one is used and two is not: not equal */
        return FALSE;
+    /* compare the state id */
+    if (one->state->id != two->state->id)
+       return FALSE;
     /* compare the position */
     if (REG_MULTI)
        return one->end.pos.lnum == two->end.pos.lnum
index b29fe76f212c6247246c72f18ede08b5c7725d09..ac3f13d54379483bb4e4d84f71516a51e2fa37d7 100644 (file)
@@ -421,6 +421,9 @@ STARTTEST
 :call add(tl, [2, '\(foo\)\@<=\>', 'barfoo', '', 'foo'])
 :call add(tl, [2, '\(foo\)\@<=.*', 'foobar', 'bar', 'foo'])
 :"
+:" complicated look-behind match
+:call add(tl, [2, '\(r\@<=\|\w\@<!\)\/', 'x = /word/;', '/'])
+:"
 :""""" \@>
 :call add(tl, [2, '\(a*\)\@>a', 'aaaa'])
 :call add(tl, [2, '\(a*\)\@>b', 'aaab', 'aaab', 'aaa'])
index 733ad870335781f0a97a902501d06ef098b5b49a..da19c042376ee0ce9cd55c2c174bbf3468e549fd 100644 (file)
@@ -974,6 +974,9 @@ OK 2 - \(foo\)\@<=\>
 OK 0 - \(foo\)\@<=.*
 OK 1 - \(foo\)\@<=.*
 OK 2 - \(foo\)\@<=.*
+OK 0 - \(r\@<=\|\w\@<!\)\/
+OK 1 - \(r\@<=\|\w\@<!\)\/
+OK 2 - \(r\@<=\|\w\@<!\)\/
 OK 0 - \(a*\)\@>a
 OK 1 - \(a*\)\@>a
 OK 2 - \(a*\)\@>a
index 8eccd3cf08d8b0aa55cd7dc1e4595a1c9087cc92..f23fd0d78af70b4d04cf26b696d5ae458b2ab2f8 100644 (file)
@@ -727,6 +727,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2,
 /**/
     1,
 /**/