]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.032 v7.4.032
authorBram Moolenaar <Bram@vim.org>
Sun, 22 Sep 2013 11:57:24 +0000 (13:57 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 22 Sep 2013 11:57:24 +0000 (13:57 +0200)
Problem:    NFA engine does not match the NUL character. (Jonathon Merz)
Solution:   Ues 0x0a instead of NUL. (Christian Brabandt)

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

index bf4100d1d925619cffc3a3551a17a1d30c3053ca..cc3a8b64b81921b92010c3cc5578c22ac45f4137 100644 (file)
@@ -1383,8 +1383,9 @@ nfa_regatom()
                            EMSG2_RET_FAIL(
                               _("E678: Invalid character after %s%%[dxouU]"),
                                    reg_magic == MAGIC_ALL);
+                       /* A NUL is stored in the text as NL */
                        /* TODO: what if a composing character follows? */
-                       EMIT(nr);
+                       EMIT(nr == 0 ? 0x0a : nr);
                    }
                    break;
 
index e694995cfd11105d1b749c9c21679a722cc56ca2..7a20e1836c634b402c5d3c4b4d7c2939075b7dde 100644 (file)
@@ -373,6 +373,7 @@ STARTTEST
 :call add(tl, [2, '\%x20', 'yes no', ' '])
 :call add(tl, [2, '\%u0020', 'yes no', ' '])
 :call add(tl, [2, '\%U00000020', 'yes no', ' '])
+:call add(tl, [2, '\%d0', "yes\x0ano", "\x0a"])
 :"
 :""""" \%[abc]
 :call add(tl, [2, 'foo\%[bar]', 'fobar'])
index 3d117b99575b9fe6aa09f657cd24dd1b6567f1d1..53affcd7e8b54ca8a5dc25df389d644cbcfda4dd 100644 (file)
@@ -863,6 +863,9 @@ OK 2 - \%u0020
 OK 0 - \%U00000020
 OK 1 - \%U00000020
 OK 2 - \%U00000020
+OK 0 - \%d0
+OK 1 - \%d0
+OK 2 - \%d0
 OK 0 - foo\%[bar]
 OK 1 - foo\%[bar]
 OK 2 - foo\%[bar]
index b07e26962bee58a5b3d717b83e6a3cd636c2c4cf..c8ba9f4f5ac005a618a5079947a6ec30fe99985d 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    32,
 /**/
     31,
 /**/