mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
clipboard: cleanup valid_yank_reg and use it for :redir
This fixes missing clipboard support for `:redir` Helped-By: Michael Reed <m.reed@mykolab.com> Helped-By: Scott Prager <splinterofchaos@gmail.com>
This commit is contained in:
@@ -305,4 +305,28 @@ describe('clipboard usage', function()
|
||||
feed(':<c-r>*<cr>')
|
||||
expect('t/u/t/')
|
||||
end)
|
||||
|
||||
it('supports :redir @*>', function()
|
||||
execute("let g:test_clip['*'] = ['stuff']")
|
||||
execute('redir @*>')
|
||||
-- it is made empty
|
||||
eq({{''}, 'v'}, eval("g:test_clip['*']"))
|
||||
execute('let g:test = doesnotexist')
|
||||
feed('<cr>')
|
||||
eq({{
|
||||
'',
|
||||
'',
|
||||
'E121: Undefined variable: doesnotexist',
|
||||
'E15: Invalid expression: doesnotexist',
|
||||
}, 'v'}, eval("g:test_clip['*']"))
|
||||
execute(':echo "Howdy!"')
|
||||
eq({{
|
||||
'',
|
||||
'',
|
||||
'E121: Undefined variable: doesnotexist',
|
||||
'E15: Invalid expression: doesnotexist',
|
||||
'',
|
||||
'Howdy!',
|
||||
}, 'v'}, eval("g:test_clip['*']"))
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user