mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
updated for version 7.4.100
Problem: NFA regexp doesn't handle backreference correctly. (Ryuichi Hayashida, Urtica Dioica) Solution: Always add NFA_SKIP, also when it already exists at the start position.
This commit is contained in:
@@ -4278,7 +4278,7 @@ addstate(l, state, subs_arg, pim, off)
|
||||
* endless loop for "\(\)*" */
|
||||
|
||||
default:
|
||||
if (state->lastlist[nfa_ll_index] == l->id)
|
||||
if (state->lastlist[nfa_ll_index] == l->id && state->c != NFA_SKIP)
|
||||
{
|
||||
/* This state is already in the list, don't add it again,
|
||||
* unless it is an MOPEN that is used for a backreference or
|
||||
|
@@ -406,6 +406,7 @@ STARTTEST
|
||||
:call add(tl, [2, '^.*\.\(.*\)/.\+\(\1\)\@<!$', 'foo.bat/foo.bat'])
|
||||
:call add(tl, [2, '^.*\.\(.*\)/.\+\(\1\)\@<=$', 'foo.bat/foo.bat', 'foo.bat/foo.bat', 'bat', 'bat'])
|
||||
:call add(tl, [2, '\\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}', '2013-06-27${0}', '${0}', '0'])
|
||||
:call add(tl, [2, '^\(a*\)\1$', 'aaaaaaaa', 'aaaaaaaa', 'aaaa'])
|
||||
:"
|
||||
:"""" Look-behind with limit
|
||||
:call add(tl, [2, '<\@<=span.', 'xxspanxx<spanyyy', 'spany'])
|
||||
|
@@ -944,6 +944,9 @@ OK 2 - ^.*\.\(.*\)/.\+\(\1\)\@<=$
|
||||
OK 0 - \\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}
|
||||
OK 1 - \\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}
|
||||
OK 2 - \\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}
|
||||
OK 0 - ^\(a*\)\1$
|
||||
OK 1 - ^\(a*\)\1$
|
||||
OK 2 - ^\(a*\)\1$
|
||||
OK 0 - <\@<=span.
|
||||
OK 1 - <\@<=span.
|
||||
OK 2 - <\@<=span.
|
||||
|
@@ -738,6 +738,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
100,
|
||||
/**/
|
||||
99,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user