summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2013-09-22 13:57:24 +0200
committerBram Moolenaar <bram@vim.org>2013-09-22 13:57:24 +0200
commit9b9228db73e11bf3aad7e6cb1385342b29f8d348 (patch)
treedc0136c34ab2cb5bd9f10e84ebbf4937db023766
parent0e9c1534fab4551ddd476b4e1a4914a48ecd4934 (diff)
downloadvim-9b9228db73e11bf3aad7e6cb1385342b29f8d348.tar.gz
updated for version 7.4.032v7.4.032v7-4-032
Problem: NFA engine does not match the NUL character. (Jonathon Merz) Solution: Ues 0x0a instead of NUL. (Christian Brabandt)
-rw-r--r--src/regexp_nfa.c3
-rw-r--r--src/testdir/test64.in1
-rw-r--r--src/testdir/test64.ok3
-rw-r--r--src/version.c2
4 files changed, 8 insertions, 1 deletions
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index bf4100d1..cc3a8b64 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -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;
diff --git a/src/testdir/test64.in b/src/testdir/test64.in
index e694995c..7a20e183 100644
--- a/src/testdir/test64.in
+++ b/src/testdir/test64.in
@@ -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'])
diff --git a/src/testdir/test64.ok b/src/testdir/test64.ok
index 3d117b99..53affcd7 100644
--- a/src/testdir/test64.ok
+++ b/src/testdir/test64.ok
@@ -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]
diff --git a/src/version.c b/src/version.c
index b07e2696..c8ba9f4f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -739,6 +739,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 32,
+/**/
31,
/**/
30,