diff options
author | Christian Brabandt <cb@256bit.org> | 2021-05-30 22:17:25 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-05-30 22:17:25 +0200 |
commit | 2fa9384ca1b600b934bec81a72c5fb7ce757503a (patch) | |
tree | 5bb926693906fc0598364604d50d9bb4daaebe09 /src/testdir/test_visual.vim | |
parent | d2ea7cf10a4d026ebd402594d656af7d5c811c24 (diff) |
patch 8.2.2914: cannot paste a block without adding paddingv8.2.2914
Problem: Cannot paste a block without adding padding.
Solution: Add "zp" and "zP" which paste without adding padding. (Christian
Brabandt, closes #8289)
Diffstat (limited to 'src/testdir/test_visual.vim')
-rw-r--r-- | src/testdir/test_visual.vim | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/testdir/test_visual.vim b/src/testdir/test_visual.vim index cd039c09fc..2b3b2139ee 100644 --- a/src/testdir/test_visual.vim +++ b/src/testdir/test_visual.vim @@ -1044,4 +1044,26 @@ func Test_visual_put_in_block() bwipe! endfunc +func Test_visual_put_in_block_using_zp() + new + " paste using zP + call setline(1, ['/path;text', '/path;text', '/path;text', '', + \ '/subdir', + \ '/longsubdir', + \ '/longlongsubdir']) + exe "normal! 5G\<c-v>2j$y" + norm! 1Gf;zP + call assert_equal(['/path/subdir;text', '/path/longsubdir;text', '/path/longlongsubdir;text'], getline(1, 3)) + %d + " paste using zP + call setline(1, ['/path;text', '/path;text', '/path;text', '', + \ '/subdir', + \ '/longsubdir', + \ '/longlongsubdir']) + exe "normal! 5G\<c-v>2j$y" + norm! 1Gf;hzp + call assert_equal(['/path/subdir;text', '/path/longsubdir;text', '/path/longlongsubdir;text'], getline(1, 3)) + bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab |