test: use exec_capture() in more places (#22787)

Problem:
Using `meths.exec2("code", { output = true })` is too verbose.

Solution:
Use exec_capture() in more places.
This commit is contained in:
zeertzjq
2023-03-26 10:49:32 +08:00
committed by GitHub
parent 4eef5ac453
commit 4863ca6b89
14 changed files with 49 additions and 45 deletions

View File

@@ -338,7 +338,8 @@ vim.cmd = setmetatable({}, {
if type(command) == 'table' then
return vim.api.nvim_cmd(command, {})
else
return vim.api.nvim_exec2(command, { output = false }).output
vim.api.nvim_exec2(command, {})
return ''
end
end,
__index = function(t, command)