]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.1207 v7.3.1207
authorBram Moolenaar <Bram@vim.org>
Sun, 16 Jun 2013 13:43:50 +0000 (15:43 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 16 Jun 2013 13:43:50 +0000 (15:43 +0200)
Problem:    New regexp engine: no match found on "#if FOO". (Lech Lorens)
Solution:   When adding a state gets skipped don't adjust the index.

src/regexp_nfa.c
src/testdir/test64.in
src/testdir/test64.ok
src/version.c

index 5414465b570451fce2b8fbb03cc5e400cd3d5aa4..47d7030e5f2e98b9da9ee91eaf1cc6a76ba6394e 100644 (file)
@@ -4210,6 +4210,8 @@ addstate_here(l, state, subs, pim, ip)
 
     /* re-order to put the new state at the current position */
     count = l->n - tlen;
+    if (count == 0)
+       return; /* no state got added */
     if (count == 1)
     {
        /* overwrite the current state */
index ad11c3c498a4346a44db59ce899e1a4a4fb5fe07..0cabcdfc03ce7f2dbdb7cc9f40edf8a4ff0be919 100644 (file)
@@ -408,6 +408,8 @@ STARTTEST
 :"""" Requiring lots of states.
 :call add(tl, [2, '[0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12}', " 12345678-1234-1234-1234-123456789012 ", "12345678-1234-1234-1234-123456789012", "1234-"])
 :"
+:"""" Skip adding state twice
+:call add(tl, [2, '^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@=', "#if FOO", "#if", ' FOO'])
 :"
 :"""" Run the tests
 :"
index 48694fb512ebacd989a461f8d06f65d832337bdf..fda589223d9ce0826cdd1fc9afd0fb5f4229d1fe 100644 (file)
@@ -913,6 +913,9 @@ OK 2 - \_[^a]\+
 OK 0 - [0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12}
 OK 1 - [0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12}
 OK 2 - [0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12}
+OK 0 - ^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@=
+OK 1 - ^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@=
+OK 2 - ^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@=
 multi-line tests
 OK 0 - ^.\(.\).\_..\1.
 OK 1 - ^.\(.\).\_..\1.
index 85147e818005cca3fa5155e75ac4b73769ac4d3f..3374e16f5e22f3345680611ff86fa4e4c1e6f6b4 100644 (file)
@@ -728,6 +728,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1207,
 /**/
     1206,
 /**/