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.
3fcfa35f82
This commit is contained in:
Jan Edmund Lazo 2018-07-10 18:15:09 -04:00 committed by Justin M. Keyes
parent 0ed8b12a07
commit a315026dc2
2 changed files with 12 additions and 0 deletions

View File

@ -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

View File

@ -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