diff options
| author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-07-17 08:37:41 -0400 |
|---|---|---|
| committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-07-17 09:01:18 -0400 |
| commit | eab17e5093687760e67d26696b8cecccb20b364a (patch) | |
| tree | 43fee00322103d060c363c81bbae8be28b9e5eb4 /src/nvim/testdir | |
| parent | cd6e7e8cf302f7d2397c89a65a483f9cd543f9dd (diff) | |
| download | rneovim-eab17e5093687760e67d26696b8cecccb20b364a.tar.gz rneovim-eab17e5093687760e67d26696b8cecccb20b364a.tar.bz2 rneovim-eab17e5093687760e67d26696b8cecccb20b364a.zip | |
vim-patch:8.0.0724: the message for yanking doesn't indicate the register
Problem: The message for yanking doesn't indicate the register.
Solution: Show the register name in the "N lines yanked" message. (Lemonboy,
closes vim/vim#1803, closes vim/vim#1809)
https://github.com/vim/vim/commit/e45deb79978677cb41f1477ba4140bccff658fd1
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/Makefile | 1 | ||||
| -rw-r--r-- | src/nvim/testdir/test_registers.vim | 27 |
2 files changed, 28 insertions, 0 deletions
diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile index e3b717989e..87d7ff5bad 100644 --- a/src/nvim/testdir/Makefile +++ b/src/nvim/testdir/Makefile @@ -93,6 +93,7 @@ NEW_TESTS ?= \ test_quickfix.res \ test_quotestar.res \ test_recover.res \ + test_registers.res \ test_retab.res \ test_scrollbind.res \ test_search.res \ diff --git a/src/nvim/testdir/test_registers.vim b/src/nvim/testdir/test_registers.vim new file mode 100644 index 0000000000..912a5c7e3d --- /dev/null +++ b/src/nvim/testdir/test_registers.vim @@ -0,0 +1,27 @@ + +func Test_yank_shows_register() + enew + set report=0 + call setline(1, ['foo', 'bar']) + " Line-wise + exe 'norm! yy' + call assert_equal('1 line yanked', v:statusmsg) + exe 'norm! "zyy' + call assert_equal('1 line yanked into "z', v:statusmsg) + exe 'norm! yj' + call assert_equal('2 lines yanked', v:statusmsg) + exe 'norm! "zyj' + call assert_equal('2 lines yanked into "z', v:statusmsg) + + " Block-wise + exe "norm! \<C-V>y" + call assert_equal('block of 1 line yanked', v:statusmsg) + exe "norm! \<C-V>\"zy" + call assert_equal('block of 1 line yanked into "z', v:statusmsg) + exe "norm! \<C-V>jy" + call assert_equal('block of 2 lines yanked', v:statusmsg) + exe "norm! \<C-V>j\"zy" + call assert_equal('block of 2 lines yanked into "z', v:statusmsg) + + bwipe! +endfunc |