forked from aniani/vim
updated for version 7.4.020
Problem: NFA engine matches too much with \@>. (John McGowan) Solution: When a whole pattern match is found stop searching.
This commit is contained in:
@@ -5322,7 +5322,10 @@ nfa_regmatch(prog, start, submatch, m)
|
||||
log_subsexpr(m);
|
||||
#endif
|
||||
nfa_match = TRUE;
|
||||
break;
|
||||
/* See comment above at "goto nextchar". */
|
||||
if (nextlist->n == 0)
|
||||
clen = 0;
|
||||
goto nextchar;
|
||||
|
||||
case NFA_START_INVISIBLE:
|
||||
case NFA_START_INVISIBLE_FIRST:
|
||||
|
@@ -427,6 +427,7 @@ STARTTEST
|
||||
:""""" \@>
|
||||
:call add(tl, [2, '\(a*\)\@>a', 'aaaa'])
|
||||
:call add(tl, [2, '\(a*\)\@>b', 'aaab', 'aaab', 'aaa'])
|
||||
:call add(tl, [2, '^\(.\{-}b\)\@>.', ' abcbd', ' abc', ' ab'])
|
||||
:" TODO: BT engine does not restore submatch after failure
|
||||
:call add(tl, [1, '\(a*\)\@>a\|a\+', 'aaaa', 'aaaa'])
|
||||
:"
|
||||
|
@@ -983,6 +983,9 @@ OK 2 - \(a*\)\@>a
|
||||
OK 0 - \(a*\)\@>b
|
||||
OK 1 - \(a*\)\@>b
|
||||
OK 2 - \(a*\)\@>b
|
||||
OK 0 - ^\(.\{-}b\)\@>.
|
||||
OK 1 - ^\(.\{-}b\)\@>.
|
||||
OK 2 - ^\(.\{-}b\)\@>.
|
||||
OK 0 - \(a*\)\@>a\|a\+
|
||||
OK 2 - \(a*\)\@>a\|a\+
|
||||
OK 0 - \_[^8-9]\+
|
||||
|
@@ -738,6 +738,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
20,
|
||||
/**/
|
||||
19,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user