aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorAndré Twupack <atwupack@mailbox.org>2014-07-20 12:11:18 +0200
committerJustin M. Keyes <justinkz@gmail.com>2014-08-07 18:12:10 -0400
commitcb809069a83223d4faf5cd627b8292273dece2f8 (patch)
tree58ad30e203759756f09fadba794bf67095cba0a3 /src/nvim/testdir
parent69497ad10a2b2231f2dc317b97124b9ec080a4d4 (diff)
downloadrneovim-cb809069a83223d4faf5cd627b8292273dece2f8.tar.gz
rneovim-cb809069a83223d4faf5cd627b8292273dece2f8.tar.bz2
rneovim-cb809069a83223d4faf5cd627b8292273dece2f8.zip
vim-patch:7.4.323 #967
Problem: Substitute() with zero width pattern breaks multi-byte character. Solution: Take multi-byte character size into account. (Yukihiro Nakadaira) https://code.google.com/p/vim/source/detail?r=238f5027830cad22e17a970483af9b160869cdf3
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test69.in7
-rw-r--r--src/nvim/testdir/test69.ok4
2 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/testdir/test69.in b/src/nvim/testdir/test69.in
index 75317b4954..674dc32812 100644
--- a/src/nvim/testdir/test69.in
+++ b/src/nvim/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/nvim/testdir/test69.ok b/src/nvim/testdir/test69.ok
index 41cd9d02c3..af8befb0c7 100644
--- a/src/nvim/testdir/test69.ok
+++ b/src/nvim/testdir/test69.ok
@@ -160,3 +160,7 @@ byteidxcomp
[0, 1, 3, 4, -1]
[0, 1, 2, 4, 5, -1]
+
+substitute
+a1a2a3a
+