aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-04-01 21:18:42 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-04-01 21:29:59 -0400
commit8843928e10512b5ce17a99d896a16f03c12aeba1 (patch)
tree87caae4fd14bbb23c52fac8c022ff95d9f802a15 /src/nvim/testdir
parent35362495c965554f45634bcde3c4ce6d5eca52aa (diff)
downloadrneovim-8843928e10512b5ce17a99d896a16f03c12aeba1.tar.gz
rneovim-8843928e10512b5ce17a99d896a16f03c12aeba1.tar.bz2
rneovim-8843928e10512b5ce17a99d896a16f03c12aeba1.zip
vim-patch:8.0.0681: unnamed register only contains the last deleted text
Problem: Unnamed register only contains the last deleted text when appending deleted text to a register. (Wolfgang Jeltsch) Solution: Only set y_previous when not using y_append. (Christian Brabandt) https://github.com/vim/vim/commit/18d90b95c49d9ff1c635dd762864022aab8e71f1
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_put.vim11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_put.vim b/src/nvim/testdir/test_put.vim
index 0b8961c52b..b95406c5a7 100644
--- a/src/nvim/testdir/test_put.vim
+++ b/src/nvim/testdir/test_put.vim
@@ -47,3 +47,14 @@ func Test_put_expr()
call assert_equal(['A1','A2','A3','4A','5A','6A'], getline(1,'$'))
bw!
endfunc
+
+func Test_put_lines()
+ new
+ let a = [ getreg('a'), getregtype('a') ]
+ call setline(1, ['Line 1', 'Line2', 'Line 3', ''])
+ exe 'norm! gg"add"AddG""p'
+ call assert_equal(['Line 3', '', 'Line 1', 'Line2'], getline(1,'$'))
+ " clean up
+ bw!
+ call setreg('a', a[0], a[1])
+endfunc