From f35118ade40d928632fef997561a8492f35982b4 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 24 Dec 2020 00:54:19 -0500 Subject: vim-patch:8.2.0907: when using :global clipboard isn't set correctly Problem: When using :global clipboard isn't set correctly. Solution: Set "clip_unnamed_saved" instead of "clip_unnamed". (Christian Brabandt, closes vim/vim#6203, closes vim/vim#6198) https://github.com/vim/vim/commit/07188fc5ef2366a3b1952e8686a4031b44152d59 --- src/nvim/testdir/test_global.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/nvim/testdir/test_global.vim b/src/nvim/testdir/test_global.vim index bdeaf8e2cf..7ccf2812ff 100644 --- a/src/nvim/testdir/test_global.vim +++ b/src/nvim/testdir/test_global.vim @@ -1,3 +1,4 @@ +source check.vim func Test_yank_put_clipboard() new @@ -10,6 +11,16 @@ func Test_yank_put_clipboard() bwipe! endfunc +func Test_global_set_clipboard() + CheckFeature clipboard_working + new + set clipboard=unnamedplus + let @+='clipboard' | g/^/set cb= | let @" = 'unnamed' | put + call assert_equal(['','unnamed'], getline(1, '$')) + set clipboard& + bwipe! +endfunc + func Test_nested_global() new call setline(1, ['nothing', 'found', 'found bad', 'bad']) -- cgit