mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 07:18:17 +00:00
ex_checkhealth: call health#check() directly
This allows us to remove :CheckHealth later (avoids wildmenu noise).
This commit is contained in:
@@ -159,7 +159,10 @@ endfunction
|
||||
" Translates a list of plugin names to healthcheck function names.
|
||||
function! s:to_fn_names(plugin_names) abort
|
||||
let healthchecks = []
|
||||
for p in a:plugin_names
|
||||
let plugin_names = type('') ==# type(a:plugin_names)
|
||||
\ ? split(a:plugin_names, '', v:false)
|
||||
\ : a:plugin_names
|
||||
for p in plugin_names
|
||||
call add(healthchecks, 'health#'.p.'#check')
|
||||
endfor
|
||||
return healthchecks
|
||||
|
@@ -22870,9 +22870,9 @@ void ex_checkhealth(exarg_T *eap)
|
||||
}
|
||||
}
|
||||
|
||||
size_t bufsize = STRLEN(eap->arg) + strlen("CheckHealth ") + 1;
|
||||
size_t bufsize = STRLEN(eap->arg) + sizeof("call health#check('')");
|
||||
char *buf = xmalloc(bufsize);
|
||||
snprintf(buf, bufsize, "CheckHealth %s", eap->arg);
|
||||
snprintf(buf, bufsize, "call health#check('%s')", eap->arg);
|
||||
|
||||
do_cmdline_cmd(buf);
|
||||
|
||||
|
Reference in New Issue
Block a user