diff src/testdir/test_join.vim @ 18914:4c0b420e7327 v8.2.0018

patch 8.2.0018: :join does not add white space where it should Commit: https://github.com/vim/vim/commit/91b65e49440e77222a65b6f868507453239f409b Author: Bram Moolenaar <Bram@vim.org> Date: Tue Dec 17 22:10:58 2019 +0100 patch 8.2.0018: :join does not add white space where it should Problem: :join does not add white space where it should. (Zdenek Dohnal) Solution: Handle joining multiple lines propely.
author Bram Moolenaar <Bram@vim.org>
date Tue, 17 Dec 2019 22:15:04 +0100
parents 9cbdd58eeeb2
children 67fbe280a502
line wrap: on
line diff
--- 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