From 8a7b6200fbaaafa13c1425faacecbd779d05d729 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Sat, 12 Jan 2019 00:52:12 +0100 Subject: provider: improve error message if provider is missing (#9487) Move `has_eval_provider()` check to `eval_call_provider()` to make sure that every code path calls it first. Previously we would, when pynvim was missing, get a nice error message for `:python3 1`, but not for `:py3file blah`. Fixes https://github.com/neovim/neovim/issues/9485 --- src/nvim/ex_cmds2.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/nvim/ex_cmds2.c') diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c index 1ffcf67ef7..dd7afa5c77 100644 --- a/src/nvim/ex_cmds2.c +++ b/src/nvim/ex_cmds2.c @@ -3908,12 +3908,7 @@ static void script_host_execute(char *name, exarg_T *eap) tv_list_append_number(args, (int)eap->line1); tv_list_append_number(args, (int)eap->line2); - if (!eval_has_provider(name)) { - emsgf("E319: No \"%s\" provider found. Run \":checkhealth provider\"", - name); - } else { - (void)eval_call_provider(name, "execute", args); - } + (void)eval_call_provider(name, "execute", args); } } -- cgit