diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-11-12 20:04:15 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-11-13 19:25:39 -0500 |
commit | 0cb6fc804dbf7b46772ea14e8c7b40909b97202c (patch) | |
tree | cc2473eea8703cc0449f8d735b9ff0482ea0b1c7 /src/nvim/testdir | |
parent | 00dc12c5d8454a2d3c6806710f63bbb446076e96 (diff) | |
download | rneovim-0cb6fc804dbf7b46772ea14e8c7b40909b97202c.tar.gz rneovim-0cb6fc804dbf7b46772ea14e8c7b40909b97202c.tar.bz2 rneovim-0cb6fc804dbf7b46772ea14e8c7b40909b97202c.zip |
vim-patch:8.1.2293: join adds trailing space when second line is empty
Problem: Join adds trailing space when second line is empty. (Brennan
Vincent)
Solution: Do not add a trailing space.
https://github.com/vim/vim/commit/cc184cfb09161b3bbc7d5d8859a18e812367d19c
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_join.vim | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_join.vim b/src/nvim/testdir/test_join.vim index 1c97414164..ecb55c9af6 100644 --- a/src/nvim/testdir/test_join.vim +++ b/src/nvim/testdir/test_join.vim @@ -9,6 +9,27 @@ func Test_join_with_count() call setline(1, ['one', 'two', 'three', 'four']) normal 10J call assert_equal('one two three four', getline(1)) + + call setline(1, ['one', '', 'two']) + normal J + call assert_equal('one', getline(1)) + + call setline(1, ['one', ' ', 'two']) + normal J + call assert_equal('one', getline(1)) + + call setline(1, ['one', '', '', 'two']) + normal JJ + call assert_equal('one', getline(1)) + + call setline(1, ['one', ' ', ' ', 'two']) + normal JJ + call assert_equal('one', getline(1)) + + call setline(1, ['one', '', '', 'two']) + normal 2J + call assert_equal('one', getline(1)) + quit! endfunc |