refactor(test): deprecate n.feed_command() #32915

Problem:
`feed_command()` was added as a "bridge" for old test code. 99% of those
cases should be using `n.command()`, which raises errors instead of
silently continuing the test.

Solution:
Deprecate `feed_command()`. It should not be used in new tests.
All usages of `feed_command()` should be converted to `command()` or
`feed()`.
This commit is contained in:
Justin M. Keyes
2025-03-15 08:45:39 -07:00
committed by GitHub
parent 19fc65acbc
commit afdad5c76e
3 changed files with 35 additions and 46 deletions

View File

@@ -620,6 +620,8 @@ function M.insert(...)
nvim_feed('<ESC>')
end
--- @deprecated Use `command()` or `feed()` instead.
---
--- Executes an ex-command by user input. Because nvim_input() is used, Vimscript
--- errors will not manifest as client (lua) errors. Use command() for that.
--- @param ... string