mirror of
https://github.com/neovim/neovim.git
synced 2026-08-25 00:21:55 +00:00
clipboard: avoid clipboard during :global. #2809
This is equivalent to patches 7.4.396, 7.4.445 and 7.4.598. vim-patch:7.4.396 Problem: When 'clipboard' is "unnamed", :g/pat/d is very slow. (Praful) Solution: Only set the clipboard after the last delete. (Christian Brabandt)1f285eb49avim-patch:7.4.445 Problem: Clipboard may be cleared on startup. Solution: Set clip_did_set_selection to -1 during startup. (Christian Brabandt)1a19d37d90vim-patch:7.4.598 Problem: ":tabdo windo echo 'hi'" causes "* register not to be changed. (Salman Halim) Solution: Change how clip_did_set_selection is used and add clipboard_needs_update and global_change_count. (Christian Brabandt)af6a579263Co-Author: @bfredl
This commit is contained in:
committed by
Justin M. Keyes
parent
7ee94d2dd7
commit
acdac914d5
@@ -1,7 +1,6 @@
|
||||
Test for various eval features. vim: set ft=vim :
|
||||
|
||||
Note: system clipboard support is not tested. I do not think anybody will thank
|
||||
me for messing with clipboard.
|
||||
Note: system clipboard is saved, changed and restored.
|
||||
|
||||
STARTTEST
|
||||
:so small.vim
|
||||
@@ -122,7 +121,19 @@ call SetReg('/', ['abc/'])
|
||||
call SetReg('/', ["abc/\n"])
|
||||
call SetReg('=', ['"abc/"'])
|
||||
call SetReg('=', ["\"abc/\n\""])
|
||||
|
||||
$put ='{{{1 System clipboard'
|
||||
" Save and restore system clipboard.
|
||||
" If no connection to X-Server is possible, test should succeed.
|
||||
:let _clipreg = ['+', getreg('+'), getregtype('+')]
|
||||
:let _clipopt = &cb
|
||||
:let &cb='unnamedplus'
|
||||
:1y
|
||||
:AR +
|
||||
:tabdo :windo :echo "hi"
|
||||
:3y
|
||||
:AR +
|
||||
:let &cb=_clipopt
|
||||
:call call('setreg', _clipreg)
|
||||
$put ='{{{1 Errors'
|
||||
call ErrExe('call setreg()')
|
||||
call ErrExe('call setreg(1)')
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user