refactor(providers): Let get_status() return a list of strings instead

This commit is contained in:
hedy
2023-11-19 19:02:00 +08:00
parent 9b90379c7a
commit 3762402dd3
3 changed files with 4 additions and 5 deletions

View File

@@ -128,8 +128,7 @@ function M.show_status(ctx)
if p.get_status then
table.insert(lines, 'Provider info:')
table.insert(lines, '')
local l = p.get_status()
for _, line in ipairs(vim.split(l, '\n', { plain = true, trimempty = false })) do
for _, line in ipairs(p.get_status()) do
table.insert(lines, indent .. line)
end
end