diff --git a/7.4.100 b/7.4.100 new file mode 100644 index 0000000..c3c0cb6 --- /dev/null +++ b/7.4.100 @@ -0,0 +1,82 @@ +To: vim_dev@googlegroups.com +Subject: Patch 7.4.100 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 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. +Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok + + +*** ../vim-7.4.099/src/regexp_nfa.c 2013-10-06 15:46:06.000000000 +0200 +--- src/regexp_nfa.c 2013-11-21 15:58:58.000000000 +0100 +*************** +*** 4278,4284 **** + * endless loop for "\(\)*" */ + + default: +! if (state->lastlist[nfa_ll_index] == l->id) + { + /* This state is already in the list, don't add it again, + * unless it is an MOPEN that is used for a backreference or +--- 4278,4284 ---- + * endless loop for "\(\)*" */ + + default: +! 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 +*** ../vim-7.4.099/src/testdir/test64.in 2013-09-25 18:16:34.000000000 +0200 +--- src/testdir/test64.in 2013-11-21 15:58:19.000000000 +0100 +*************** +*** 406,411 **** +--- 406,412 ---- + :call add(tl, [2, '^.*\.\(.*\)/.\+\(\1\)\@