|
|
8b9a1c |
To: vim_dev@googlegroups.com
|
|
|
8b9a1c |
Subject: Patch 7.4.100
|
|
|
8b9a1c |
Fcc: outbox
|
|
|
8b9a1c |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
8b9a1c |
Mime-Version: 1.0
|
|
|
8b9a1c |
Content-Type: text/plain; charset=UTF-8
|
|
|
8b9a1c |
Content-Transfer-Encoding: 8bit
|
|
|
8b9a1c |
------------
|
|
|
8b9a1c |
|
|
|
8b9a1c |
Patch 7.4.100
|
|
|
8b9a1c |
Problem: NFA regexp doesn't handle backreference correctly. (Ryuichi
|
|
|
8b9a1c |
Hayashida, Urtica Dioica)
|
|
|
8b9a1c |
Solution: Always add NFA_SKIP, also when it already exists at the start
|
|
|
8b9a1c |
position.
|
|
|
8b9a1c |
Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok
|
|
|
8b9a1c |
|
|
|
8b9a1c |
|
|
|
8b9a1c |
*** ../vim-7.4.099/src/regexp_nfa.c 2013-10-06 15:46:06.000000000 +0200
|
|
|
8b9a1c |
--- src/regexp_nfa.c 2013-11-21 15:58:58.000000000 +0100
|
|
|
8b9a1c |
***************
|
|
|
8b9a1c |
*** 4278,4284 ****
|
|
|
8b9a1c |
* endless loop for "\(\)*" */
|
|
|
8b9a1c |
|
|
|
8b9a1c |
default:
|
|
|
8b9a1c |
! if (state->lastlist[nfa_ll_index] == l->id)
|
|
|
8b9a1c |
{
|
|
|
8b9a1c |
/* This state is already in the list, don't add it again,
|
|
|
8b9a1c |
* unless it is an MOPEN that is used for a backreference or
|
|
|
8b9a1c |
--- 4278,4284 ----
|
|
|
8b9a1c |
* endless loop for "\(\)*" */
|
|
|
8b9a1c |
|
|
|
8b9a1c |
default:
|
|
|
8b9a1c |
! if (state->lastlist[nfa_ll_index] == l->id && state->c != NFA_SKIP)
|
|
|
8b9a1c |
{
|
|
|
8b9a1c |
/* This state is already in the list, don't add it again,
|
|
|
8b9a1c |
* unless it is an MOPEN that is used for a backreference or
|
|
|
8b9a1c |
*** ../vim-7.4.099/src/testdir/test64.in 2013-09-25 18:16:34.000000000 +0200
|
|
|
8b9a1c |
--- src/testdir/test64.in 2013-11-21 15:58:19.000000000 +0100
|
|
|
8b9a1c |
***************
|
|
|
8b9a1c |
*** 406,411 ****
|
|
|
8b9a1c |
--- 406,412 ----
|
|
|
8b9a1c |
:call add(tl, [2, '^.*\.\(.*\)/.\+\(\1\)\@
|
|
|
8b9a1c |
:call add(tl, [2, '^.*\.\(.*\)/.\+\(\1\)\@<=$', 'foo.bat/foo.bat', 'foo.bat/foo.bat', 'bat', 'bat'])
|
|
|
8b9a1c |
:call add(tl, [2, '\\\@
|
|
|
8b9a1c |
+ :call add(tl, [2, '^\(a*\)\1$', 'aaaaaaaa', 'aaaaaaaa', 'aaaa'])
|
|
|
8b9a1c |
:"
|
|
|
8b9a1c |
:"""" Look-behind with limit
|
|
|
8b9a1c |
:call add(tl, [2, '<\@<=span.', 'xxspanxx
|
|
|
8b9a1c |
*** ../vim-7.4.099/src/testdir/test64.ok 2013-09-25 18:16:34.000000000 +0200
|
|
|
8b9a1c |
--- src/testdir/test64.ok 2013-11-21 15:59:04.000000000 +0100
|
|
|
8b9a1c |
***************
|
|
|
8b9a1c |
*** 944,949 ****
|
|
|
8b9a1c |
--- 944,952 ----
|
|
|
8b9a1c |
OK 0 - \\\@
|
|
|
8b9a1c |
OK 1 - \\\@
|
|
|
8b9a1c |
OK 2 - \\\@
|
|
|
8b9a1c |
+ OK 0 - ^\(a*\)\1$
|
|
|
8b9a1c |
+ OK 1 - ^\(a*\)\1$
|
|
|
8b9a1c |
+ OK 2 - ^\(a*\)\1$
|
|
|
8b9a1c |
OK 0 - <\@<=span.
|
|
|
8b9a1c |
OK 1 - <\@<=span.
|
|
|
8b9a1c |
OK 2 - <\@<=span.
|
|
|
8b9a1c |
*** ../vim-7.4.099/src/version.c 2013-11-21 14:39:58.000000000 +0100
|
|
|
8b9a1c |
--- src/version.c 2013-11-21 16:02:27.000000000 +0100
|
|
|
8b9a1c |
***************
|
|
|
8b9a1c |
*** 740,741 ****
|
|
|
8b9a1c |
--- 740,743 ----
|
|
|
8b9a1c |
{ /* Add new patch number below this line */
|
|
|
8b9a1c |
+ /**/
|
|
|
8b9a1c |
+ 100,
|
|
|
8b9a1c |
/**/
|
|
|
8b9a1c |
|
|
|
8b9a1c |
--
|
|
|
8b9a1c |
Sometimes you can protect millions of dollars in your budget simply by buying
|
|
|
8b9a1c |
a bag of cookies, dropping it on the budget anylyst's desk, and saying
|
|
|
8b9a1c |
something deeply personal such as "How was your weekend, big guy?"
|
|
|
8b9a1c |
(Scott Adams - The Dilbert principle)
|
|
|
8b9a1c |
|
|
|
8b9a1c |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
8b9a1c |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
8b9a1c |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
8b9a1c |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|