diff src/testdir/test_global.vim @ 20707:ec89debe5037 v8.2.0907

patch 8.2.0907: when using :global clipboard isn't set correctly Commit: https://github.com/vim/vim/commit/07188fc5ef2366a3b1952e8686a4031b44152d59 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jun 5 20:03:16 2020 +0200 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 #6203, closes #6198)
author Bram Moolenaar <Bram@vim.org>
date Fri, 05 Jun 2020 20:15:04 +0200
parents 0208534b8a84
children 6a4806e326dd
line wrap: on
line diff
--- a/src/testdir/test_global.vim
+++ b/src/testdir/test_global.vim
@@ -1,3 +1,4 @@
+source check.vim
 
 func Test_yank_put_clipboard()
   new
@@ -13,6 +14,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'])