mirror of
https://github.com/neovim/neovim.git
synced 2026-08-31 03:13:48 +00:00
api: change nvim_command_output behavior
Implement nvim_command_output with `execute({cmd},"silent")`.
Behavior changes:
- does not provoke any hit-enter prompt
- no longer prepends a newline char
- does not capture some noise (like the "[New File]" message, see the
change to tabnewentered_spec.lua)
Technically ("bug-for-bug") this a breaking change. But the previous
behavior of nvim_command_output meant that it probably wasn't used for
anything outside of tests.
Also remove the undocumented `v:command_output` variable which was
a hack introduced only for the purposes of nvim_command_output.
closes #7726
This commit is contained in:
@@ -16,8 +16,8 @@ describe('sign', function()
|
||||
nvim('command', 'sign place 34 line=3 name=Foo buffer='..buf2)
|
||||
-- now unplace without specifying a buffer
|
||||
nvim('command', 'sign unplace 34')
|
||||
eq("\n--- Signs ---\n", nvim('command_output', 'sign place buffer='..buf1))
|
||||
eq("\n--- Signs ---\n", nvim('command_output', 'sign place buffer='..buf2))
|
||||
eq("--- Signs ---\n", nvim('command_output', 'sign place buffer='..buf1))
|
||||
eq("--- Signs ---\n", nvim('command_output', 'sign place buffer='..buf2))
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user