mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
parent
bdcb2a38b3
commit
6a68a922b8
@ -513,6 +513,12 @@ int main(int argc, char **argv)
|
|||||||
apply_autocmds(EVENT_VIMENTER, NULL, NULL, false, curbuf);
|
apply_autocmds(EVENT_VIMENTER, NULL, NULL, false, curbuf);
|
||||||
TIME_MSG("VimEnter autocommands");
|
TIME_MSG("VimEnter autocommands");
|
||||||
|
|
||||||
|
// Adjust default register name for "unnamed" in 'clipboard'. Can only be
|
||||||
|
// done after the clipboard is available and all initial commands that may
|
||||||
|
// modify the 'clipboard' setting have run; i.e. just before entering the
|
||||||
|
// main loop.
|
||||||
|
set_reg_var(get_default_register_name());
|
||||||
|
|
||||||
/* When a startup script or session file setup for diff'ing and
|
/* When a startup script or session file setup for diff'ing and
|
||||||
* scrollbind, sync the scrollbind now. */
|
* scrollbind, sync the scrollbind now. */
|
||||||
if (curwin->w_p_diff && curwin->w_p_scb) {
|
if (curwin->w_p_diff && curwin->w_p_scb) {
|
||||||
|
@ -89,9 +89,12 @@ describe('the unnamed register', function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
describe('clipboard usage', function()
|
describe('clipboard usage', function()
|
||||||
|
local function reset(...)
|
||||||
|
clear('--cmd', 'let &rtp = "test/functional/fixtures,".&rtp', ...)
|
||||||
|
end
|
||||||
|
|
||||||
before_each(function()
|
before_each(function()
|
||||||
clear()
|
reset()
|
||||||
execute('let &rtp = "test/functional/fixtures,".&rtp')
|
|
||||||
execute('call getreg("*")') -- force load of provider
|
execute('call getreg("*")') -- force load of provider
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@ -363,6 +366,13 @@ describe('clipboard usage', function()
|
|||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it('sets v:register after startup', function()
|
||||||
|
reset()
|
||||||
|
eq('"', eval('v:register'))
|
||||||
|
reset('--cmd', 'set clipboard=unnamed')
|
||||||
|
eq('*', eval('v:register'))
|
||||||
|
end)
|
||||||
|
|
||||||
it('supports :put', function()
|
it('supports :put', function()
|
||||||
insert("a line")
|
insert("a line")
|
||||||
execute("let g:test_clip['*'] = ['some text']")
|
execute("let g:test_clip['*'] = ['some text']")
|
||||||
|
Loading…
Reference in New Issue
Block a user