diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-06-12 18:39:22 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-06-12 18:39:22 +0200 |
commit | 8e7048ca4b699bbdb8452c0f8c642bfd66cc7bf4 (patch) | |
tree | c53e7f1de5f3c0bb3ab1c0ef29811feb08ecf174 /src/testdir | |
parent | e639eb44e9ca063f682f064095aa98fc781f5df1 (diff) | |
download | vim-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.in | 7 | ||||
-rw-r--r-- | src/testdir/test69.ok | 4 |
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 + |