diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-05-30 21:58:16 -0400 |
|---|---|---|
| committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-05-31 21:06:11 -0400 |
| commit | e39973156173ce8511ff1ae88eec19a3200e08d8 (patch) | |
| tree | f87733727d0cc8dedb89560da0694a3238bef7d7 /src/nvim/testdir | |
| parent | 73e3669c7a8e2d4f63be17e0f93ee3c641f8806f (diff) | |
| download | rneovim-e39973156173ce8511ff1ae88eec19a3200e08d8.tar.gz rneovim-e39973156173ce8511ff1ae88eec19a3200e08d8.tar.bz2 rneovim-e39973156173ce8511ff1ae88eec19a3200e08d8.zip | |
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)
https://github.com/vim/vim/commit/2fa9384ca1b600b934bec81a72c5fb7ce757503a
Cherry-pick Test_normal_z_error() from patch v8.2.0369.
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_normal.vim | 6 | ||||
| -rw-r--r-- | src/nvim/testdir/test_visual.vim | 22 |
2 files changed, 28 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_normal.vim b/src/nvim/testdir/test_normal.vim index 7a846e5ea0..e9de94c0b3 100644 --- a/src/nvim/testdir/test_normal.vim +++ b/src/nvim/testdir/test_normal.vim @@ -512,6 +512,12 @@ func Test_normal14_page_eol() bw! endfunc +" Test for errors with z command +func Test_normal_z_error() + call assert_beeps('normal! z2p') + call assert_beeps('normal! zq') +endfunc + func Test_normal15_z_scroll_vert() " basic test for z commands that scroll the window call Setup_NewWindow() diff --git a/src/nvim/testdir/test_visual.vim b/src/nvim/testdir/test_visual.vim index 73c7960579..d9d10b9681 100644 --- a/src/nvim/testdir/test_visual.vim +++ b/src/nvim/testdir/test_visual.vim @@ -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 |