Mercurial > vim
comparison src/testdir/test_join.vim @ 8445:dd2e2bd69d0e v7.4.1513
commit https://github.com/vim/vim/commit/41e0f2f48f541eb2c8eb5620d3f1d270eb979154
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Mar 8 14:44:42 2016 +0100
patch 7.4.1513
Problem: "J" fails if there are not enough lines. (Christian Neukirchen)
Solution: Reduce the count, only fail on the last line.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 08 Mar 2016 14:45:05 +0100 |
parents | |
children | 15f0f9f16cd9 |
comparison
equal
deleted
inserted
replaced
8444:865b2c46e625 | 8445:dd2e2bd69d0e |
---|---|
1 " Test for joining lines. | |
2 | |
3 func Test_join_with_count() | |
4 new | |
5 call setline(1, ['one', 'two', 'three', 'four']) | |
6 normal J | |
7 call assert_equal('one two', getline(1)) | |
8 %del | |
9 call setline(1, ['one', 'two', 'three', 'four']) | |
10 normal 10J | |
11 call assert_equal('one two three four', getline(1)) | |
12 quit! | |
13 endfunc |