break;
case NFA_MCLOSE:
- if (nfa_has_zend)
+ if (nfa_has_zend && (REG_MULTI
+ ? subs->norm.list.multi[0].end.lnum >= 0
+ : subs->norm.list.line[0].end != NULL))
{
- /* Do not overwrite the position set by \ze. If no \ze
- * encountered end will be set in nfa_regtry(). */
+ /* Do not overwrite the position set by \ze. */
subs = addstate(l, state->out, subs, pim, off);
break;
}
:call add(tl, [2, 'abc \zsmatch\ze abc', 'abc abc abc match abc abc', 'match'])
:call add(tl, [2, '\v(a \zsif .*){2}', 'a if then a if last', 'if last', 'a if last'])
:call add(tl, [2, '\>\zs.', 'aword. ', '.'])
+:call add(tl, [2, '\s\+\ze\[/\|\s\zs\s\+', 'is [a t', ' '])
:"
:"""" Tests for \@= and \& features
:call add(tl, [2, 'abc\@=', 'abc', 'ab'])