comparison 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
comparison
equal deleted inserted replaced
20706:666c23d18e53 20707:ec89debe5037
1 source check.vim
1 2
2 func Test_yank_put_clipboard() 3 func Test_yank_put_clipboard()
3 new 4 new
4 call setline(1, ['a', 'b', 'c']) 5 call setline(1, ['a', 'b', 'c'])
5 set clipboard=unnamed 6 set clipboard=unnamed
7 call assert_equal(['a', 'a', 'b', 'b', 'c', 'c'], getline(1, 6)) 8 call assert_equal(['a', 'a', 'b', 'b', 'c', 'c'], getline(1, 6))
8 set clipboard=unnamed,unnamedplus 9 set clipboard=unnamed,unnamedplus
9 call setline(1, ['a', 'b', 'c']) 10 call setline(1, ['a', 'b', 'c'])
10 g/^/normal yyp 11 g/^/normal yyp
11 call assert_equal(['a', 'a', 'b', 'b', 'c', 'c'], getline(1, 6)) 12 call assert_equal(['a', 'a', 'b', 'b', 'c', 'c'], getline(1, 6))
13 set clipboard&
14 bwipe!
15 endfunc
16
17 func Test_global_set_clipboard()
18 CheckFeature clipboard_working
19 new
20 set clipboard=unnamedplus
21 let @+='clipboard' | g/^/set cb= | let @" = 'unnamed' | put
22 call assert_equal(['','unnamed'], getline(1, '$'))
12 set clipboard& 23 set clipboard&
13 bwipe! 24 bwipe!
14 endfunc 25 endfunc
15 26
16 func Test_nested_global() 27 func Test_nested_global()