mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 16:08:36 +00:00
vim-patch:8.2.2914: cannot paste a block without adding padding
Problem: Cannot paste a block without adding padding.
Solution: Add "zp" and "zP" which paste without adding padding. (Christian
Brabandt, closes vim/vim#8289)
2fa9384ca1
Cherry-pick Test_normal_z_error() from patch v8.2.0369.
This commit is contained in:
@@ -738,4 +738,26 @@ func Test_select_mode_gv()
|
||||
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
|
||||
|
Reference in New Issue
Block a user