Mercurial > vim
diff src/regexp_nfa.c @ 4692:08fbb1ce1bc5 v7.3.1093
updated for version 7.3.1093
Problem: New regexp engine: When a sub expression is empty \1 skips a
character.
Solution: Make \1 try the current position when the match is emtpy.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 02 Jun 2013 16:07:10 +0200 |
parents | 9d97a0c045ef |
children | efc4fb311d5d |
line wrap: on
line diff
--- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -4435,11 +4435,10 @@ nfa_regmatch(start, submatch, m, endp) { if (bytelen == 0) { - /* empty match always works, add NFA_SKIP with zero to - * be used next */ - addstate_here(thislist, t->state->out, &t->subs, + /* empty match always works, output of NFA_SKIP to be + * used next */ + addstate_here(thislist, t->state->out->out, &t->subs, &listidx); - thislist->t[listidx + 1].count = 0; } else if (bytelen <= clen) {