]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.1185 v7.3.1185
authorBram Moolenaar <Bram@vim.org>
Thu, 13 Jun 2013 18:19:40 +0000 (20:19 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 13 Jun 2013 18:19:40 +0000 (20:19 +0200)
Problem:    New regexp engine: no match with ^ after \n. (SungHyun Nam)
Solution:   Fix it, add a test.

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

index 780653f032aa10db5659adc843dcc6d16304896c..20f7aa31b5d429c71e3f2ed085aca98904928b95 100644 (file)
@@ -3936,9 +3936,10 @@ addstate(l, state, subs, pim, off)
        case NFA_BOL:
        case NFA_BOF:
            /* "^" won't match past end-of-line, don't bother trying.
-            * Except when we are going to the next line for a look-behind
-            * match. */
+            * Except when at the end of the line, or when we are going to the
+            * next line for a look-behind match. */
            if (reginput > regline
+                   && *reginput != NUL
                    && (nfa_endp == NULL
                        || !REG_MULTI
                        || reglnum == nfa_endp->se_u.pos.lnum))
index 8100436f16bbac76c2077fa9f5c532bd2b60d496..51cdb31e8ee9c98538b16832c1fb0fc5f3f53db4 100644 (file)
@@ -480,6 +480,12 @@ Go\ep:"
 :.yank
 y$Go\ep:"
 :"
+:" Check a pattern with a line break and ^ and $
+/^Abc:
+/a\n^b$\n^c/e
+:.yank
+Go\ep:"
+:"
 :" Check a pattern with a look beind crossing a line boundary
 /^Behind:
 /\(<\_[xy]\+\)\@3<=start
@@ -555,6 +561,11 @@ ghi
 xjk
 lmn
 
+Abc:
+a
+b
+c
+
 Behind:
 asdfasd<yyy
 xxstart1
index 8e90cb8f8508424b0aa35cdad3814156cc8d1a4e..20725dde4297a7add329d142d4297ba55c1a4ed4 100644 (file)
@@ -918,6 +918,8 @@ OK 2 - [0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12}
 <T="7">Ac 7</Title>
 ghi
 
+c
+
 xxstart3
 
 thexE thE thExethe
index f003bbc0aafd46afd16332bcc5b348cbf90cb92e..7f315b81a1682946f894a59c00ac967f8fbf50d0 100644 (file)
@@ -728,6 +728,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1185,
 /**/
     1184,
 /**/