diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-06-02 16:07:10 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-06-02 16:07:10 +0200 |
commit | b122e9798e058645ab3936eb12e02bd61403ac33 (patch) | |
tree | fc2d16eb4a5eda6dc2e045362c1eb77ff87c307e /src/regexp_nfa.c | |
parent | 69afb7bf0aef4e9b39acbdb7849dd9c44b1345c5 (diff) | |
download | vim-git-b122e9798e058645ab3936eb12e02bd61403ac33.tar.gz |
updated for version 7.3.1093v7.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.
Diffstat (limited to 'src/regexp_nfa.c')
-rw-r--r-- | src/regexp_nfa.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index 11aca9c13..8abdbb5e9 100644 --- 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) { |