forked from aniani/vim
updated for version 7.4.002
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.
This commit is contained in:
@@ -3782,6 +3782,9 @@ pim_equal(one, two)
|
|||||||
if (two_unused)
|
if (two_unused)
|
||||||
/* one is used and two is not: not equal */
|
/* one is used and two is not: not equal */
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
/* compare the state id */
|
||||||
|
if (one->state->id != two->state->id)
|
||||||
|
return FALSE;
|
||||||
/* compare the position */
|
/* compare the position */
|
||||||
if (REG_MULTI)
|
if (REG_MULTI)
|
||||||
return one->end.pos.lnum == two->end.pos.lnum
|
return one->end.pos.lnum == two->end.pos.lnum
|
||||||
|
@@ -421,6 +421,9 @@ STARTTEST
|
|||||||
:call add(tl, [2, '\(foo\)\@<=\>', 'barfoo', '', 'foo'])
|
:call add(tl, [2, '\(foo\)\@<=\>', 'barfoo', '', 'foo'])
|
||||||
:call add(tl, [2, '\(foo\)\@<=.*', 'foobar', 'bar', '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*\)\@>a', 'aaaa'])
|
||||||
:call add(tl, [2, '\(a*\)\@>b', 'aaab', 'aaab', 'aaa'])
|
:call add(tl, [2, '\(a*\)\@>b', 'aaab', 'aaab', 'aaa'])
|
||||||
|
@@ -974,6 +974,9 @@ OK 2 - \(foo\)\@<=\>
|
|||||||
OK 0 - \(foo\)\@<=.*
|
OK 0 - \(foo\)\@<=.*
|
||||||
OK 1 - \(foo\)\@<=.*
|
OK 1 - \(foo\)\@<=.*
|
||||||
OK 2 - \(foo\)\@<=.*
|
OK 2 - \(foo\)\@<=.*
|
||||||
|
OK 0 - \(r\@<=\|\w\@<!\)\/
|
||||||
|
OK 1 - \(r\@<=\|\w\@<!\)\/
|
||||||
|
OK 2 - \(r\@<=\|\w\@<!\)\/
|
||||||
OK 0 - \(a*\)\@>a
|
OK 0 - \(a*\)\@>a
|
||||||
OK 1 - \(a*\)\@>a
|
OK 1 - \(a*\)\@>a
|
||||||
OK 2 - \(a*\)\@>a
|
OK 2 - \(a*\)\@>a
|
||||||
|
@@ -727,6 +727,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2,
|
||||||
/**/
|
/**/
|
||||||
1,
|
1,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user