mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06: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
@@ -285,6 +285,22 @@ describe('clipboard usage', function()
|
||||
the text]])
|
||||
end)
|
||||
|
||||
it('is updated on global changes', function()
|
||||
insert([[
|
||||
text
|
||||
match
|
||||
match
|
||||
text
|
||||
]])
|
||||
execute('g/match/d')
|
||||
eq('match\n', eval('getreg("*")'))
|
||||
feed('u')
|
||||
eval('setreg("*", "---")')
|
||||
execute('g/test/')
|
||||
feed('<esc>')
|
||||
eq('---', eval('getreg("*")'))
|
||||
end)
|
||||
|
||||
end)
|
||||
|
||||
describe('with clipboard=unnamedplus', function()
|
||||
@@ -329,6 +345,21 @@ describe('clipboard usage', function()
|
||||
really unnamed
|
||||
the plus]])
|
||||
end)
|
||||
it('is updated on global changes', function()
|
||||
insert([[
|
||||
text
|
||||
match
|
||||
match
|
||||
text
|
||||
]])
|
||||
execute('g/match/d')
|
||||
eq('match\n', eval('getreg("+")'))
|
||||
feed('u')
|
||||
eval('setreg("+", "---")')
|
||||
execute('g/test/')
|
||||
feed('<esc>')
|
||||
eq('---', eval('getreg("+")'))
|
||||
end)
|
||||
end)
|
||||
|
||||
it('supports :put', function()
|
||||
|
||||
Reference in New Issue
Block a user