summaryrefslogtreecommitdiff
path: root/src/testdir
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-06-12 18:39:22 +0200
committerBram Moolenaar <Bram@vim.org>2014-06-12 18:39:22 +0200
commit8e7048ca4b699bbdb8452c0f8c642bfd66cc7bf4 (patch)
treec53e7f1de5f3c0bb3ab1c0ef29811feb08ecf174 /src/testdir
parente639eb44e9ca063f682f064095aa98fc781f5df1 (diff)
downloadvim-8e7048ca4b699bbdb8452c0f8c642bfd66cc7bf4.zip
updated for version 7.4.323
Problem: Substitute() with zero width pattern breaks multi-byte character. Solution: Take multi-byte character size into account. (Yukihiro Nakadaira)
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test69.in7
-rw-r--r--src/testdir/test69.ok4
2 files changed, 11 insertions, 0 deletions
diff --git a/src/testdir/test69.in b/src/testdir/test69.in
index 75317b495..2510c122b 100644
--- a/src/testdir/test69.in
+++ b/src/testdir/test69.in
@@ -180,6 +180,13 @@ byteidx
byteidxcomp
STARTTEST
+/^substitute
+:let y = substitute('123', '\zs', 'a', 'g') | put =y
+ENDTEST
+
+substitute
+
+STARTTEST
:g/^STARTTEST/.,/^ENDTEST/d
:1;/^Results/,$wq! test.out
ENDTEST
diff --git a/src/testdir/test69.ok b/src/testdir/test69.ok
index 41cd9d02c..af8befb0c 100644
--- a/src/testdir/test69.ok
+++ b/src/testdir/test69.ok
@@ -160,3 +160,7 @@ byteidxcomp
[0, 1, 3, 4, -1]
[0, 1, 2, 4, 5, -1]
+
+substitute
+a1a2a3a
+