From 8843928e10512b5ce17a99d896a16f03c12aeba1 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 1 Apr 2019 21:18:42 -0400 Subject: 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 --- src/nvim/testdir/test_put.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/nvim/testdir') 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 -- cgit