diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-03-26 10:49:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-26 10:49:32 +0800 |
commit | 4863ca6b8902c5b0aab95f2af640118cd417d379 (patch) | |
tree | 41a1ecb32984dc88f25df722abaf3ba381db3cf3 /runtime/lua/vim/_editor.lua | |
parent | 4eef5ac453866dae7c03f5432fc8c4dfcda19f54 (diff) | |
download | rneovim-4863ca6b8902c5b0aab95f2af640118cd417d379.tar.gz rneovim-4863ca6b8902c5b0aab95f2af640118cd417d379.tar.bz2 rneovim-4863ca6b8902c5b0aab95f2af640118cd417d379.zip |
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.
Diffstat (limited to 'runtime/lua/vim/_editor.lua')
-rw-r--r-- | runtime/lua/vim/_editor.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/lua/vim/_editor.lua b/runtime/lua/vim/_editor.lua index db7a6c1d17..2ff4d440f0 100644 --- a/runtime/lua/vim/_editor.lua +++ b/runtime/lua/vim/_editor.lua @@ -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) |