From a315026dc290dc3841ee4485660bcb71d59e4ce8 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 10 Jul 2018 18:15:09 -0400 Subject: [PATCH] vim-patch:8.0.0522: Win32: clipboard=unnamed in :global (#8717) Problem: MS-Windows: when 'clipboard' is "unnamed" yyp does not work in a :global command. Solution: When setting the clipboard was postponed, do not clear the register. https://github.com/vim/vim/commit/3fcfa35f82b9d1ef5e95051b3a45578e10c14ec3 --- src/nvim/testdir/test_alot.vim | 1 + src/nvim/testdir/test_global.vim | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 src/nvim/testdir/test_global.vim diff --git a/src/nvim/testdir/test_alot.vim b/src/nvim/testdir/test_alot.vim index 71f3ad1bc0..25e4fd5ae8 100644 --- a/src/nvim/testdir/test_alot.vim +++ b/src/nvim/testdir/test_alot.vim @@ -15,6 +15,7 @@ source test_findfile.vim source test_float_func.vim source test_functions.vim source test_ga.vim +source test_global.vim source test_goto.vim source test_jumps.vim source test_fileformat.vim diff --git a/src/nvim/testdir/test_global.vim b/src/nvim/testdir/test_global.vim new file mode 100644 index 0000000000..be8aa69623 --- /dev/null +++ b/src/nvim/testdir/test_global.vim @@ -0,0 +1,11 @@ + +func Test_yank_put_clipboard() + new + call setline(1, ['a', 'b', 'c']) + set clipboard=unnamed + g/^/normal yyp + call assert_equal(['a', 'a', 'b', 'b', 'c', 'c'], getline(1, 6)) + + set clipboard& + bwipe! +endfunc