diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-12-17 22:10:58 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-12-17 22:10:58 +0100 |
commit | 91b65e49440e77222a65b6f868507453239f409b (patch) | |
tree | 4f01f1f4186e679cbf299ddaae53a70ceeab0417 /src/testdir/test_join.vim | |
parent | 6f345a1458df2db03fba7863492404e9dc8b817c (diff) | |
download | vim-git-91b65e49440e77222a65b6f868507453239f409b.tar.gz |
patch 8.2.0018: :join does not add white space where it shouldv8.2.0018
Problem: :join does not add white space where it should. (Zdenek Dohnal)
Solution: Handle joining multiple lines propely.
Diffstat (limited to 'src/testdir/test_join.vim')
-rw-r--r-- | src/testdir/test_join.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/testdir/test_join.vim b/src/testdir/test_join.vim index 5801c2f12..377edab1e 100644 --- a/src/testdir/test_join.vim +++ b/src/testdir/test_join.vim @@ -427,3 +427,14 @@ int i = 7 /* foo *// 3 call assert_equal(expected, getline(1, '$')) close! endfunc + +func Test_join_lines() + new + call setline(1, ['a', 'b', '', 'c', 'd']) + %join + call assert_equal('a b c d', getline(1)) + call setline(1, ['a', 'b', '', 'c', 'd']) + normal 5J + call assert_equal('a b c d', getline(1)) + bwipe! +endfunc |