forked from aniani/vim
updated for version 7.4.290
Problem: A non-greedy match followed by a branch is too greedy. (Ingo
Karkat)
Solution: Add NFA_MATCH when it is already in the state list if the position
differs.
This commit is contained in:
@@ -4324,8 +4324,10 @@ addstate(l, state, subs_arg, pim, off)
|
||||
{
|
||||
/* This state is already in the list, don't add it again,
|
||||
* unless it is an MOPEN that is used for a backreference or
|
||||
* when there is a PIM. */
|
||||
if (!nfa_has_backref && pim == NULL && !l->has_pim)
|
||||
* when there is a PIM. For NFA_MATCH check the position,
|
||||
* lower position is preferred. */
|
||||
if (!nfa_has_backref && pim == NULL && !l->has_pim
|
||||
&& state->c != NFA_MATCH)
|
||||
{
|
||||
skip_add:
|
||||
#ifdef ENABLE_LOG
|
||||
|
||||
Reference in New Issue
Block a user