aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/autoload/health.vim5
-rw-r--r--src/nvim/eval.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/runtime/autoload/health.vim b/runtime/autoload/health.vim
index 028b6cca8e..b076f2456b 100644
--- a/runtime/autoload/health.vim
+++ b/runtime/autoload/health.vim
@@ -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
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 986c4a9a17..aab777955c 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -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);