mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
fix(api): make nvim_cmd mods.silent work correctly (#19489)
This commit is contained in:
@@ -3733,6 +3733,12 @@ describe('API', function()
|
||||
eq("", meths.cmd({ cmd = "Foo", bang = false }, { output = true }))
|
||||
end)
|
||||
it('works with modifiers', function()
|
||||
-- with :silent output is still captured
|
||||
eq('1',
|
||||
meths.cmd({ cmd = 'echomsg', args = { '1' }, mods = { silent = true } },
|
||||
{ output = true }))
|
||||
-- with :silent message isn't added to message history
|
||||
eq('', meths.cmd({ cmd = 'messages' }, { output = true }))
|
||||
meths.create_user_command("Foo", 'set verbose', {})
|
||||
eq(" verbose=1", meths.cmd({ cmd = "Foo", mods = { verbose = 1 } }, { output = true }))
|
||||
eq(0, meths.get_option_value("verbose", {}))
|
||||
|
||||
Reference in New Issue
Block a user