aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-10-16 00:05:35 +0200
committerJustin M. Keyes <justinkz@gmail.com>2017-10-17 01:51:21 +0200
commit014bd59957beb3f94cfb014a7acde3d2544bdfd9 (patch)
treec656cb11fa698383d087c196158ba12e7689f8da
parentd5d7a9928da8d670e94a9e5e08d6814759b702b6 (diff)
downloadrneovim-014bd59957beb3f94cfb014a7acde3d2544bdfd9.tar.gz
rneovim-014bd59957beb3f94cfb014a7acde3d2544bdfd9.tar.bz2
rneovim-014bd59957beb3f94cfb014a7acde3d2544bdfd9.zip
ex_checkhealth: call health#check() directly
This allows us to remove :CheckHealth later (avoids wildmenu noise).
-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);