fix(checkhealth): fix crash due to incorrect argument type

This commit is contained in:
dundargoc 2023-04-16 12:26:13 +02:00 committed by GitHub
parent 2f779b94e7
commit b0978fca6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,9 @@
function! s:deprecate(type) abort
let deprecate = v:lua.vim.deprecate('health#report_' . a:type, 'vim.health.' . a:type, '0.11')
redraw | echo 'Running healthchecks...'
call v:lua.vim.health.warn(deprecate)
if deprecate isnot v:null
call v:lua.vim.health.warn(deprecate)
endif
endfunction
function! health#report_start(name) abort

View File

@ -266,7 +266,7 @@ function M._check(plugin_names)
M.error('No healthcheck found for "' .. name .. '" plugin.')
end
if type == 'v' then
vim.cmd.call(func, {})
vim.fn.call(func, {})
else
local f = assert(loadstring(func))
local ok, output = pcall(f)