diff options
author | Marco Hinz <mh.codebro+github@gmail.com> | 2019-01-12 00:52:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-12 00:52:12 +0100 |
commit | db3c797c6b3ce9c4f0f50ae22acde0c1aac60725 (patch) | |
tree | 64d9a43c8f5a09949c152319e2dcd6384a268bd8 /src/nvim/ex_cmds2.c | |
parent | 8853fca1fdc5ee3a2aea3eb3e772e091946a3a71 (diff) | |
download | rneovim-db3c797c6b3ce9c4f0f50ae22acde0c1aac60725.tar.gz rneovim-db3c797c6b3ce9c4f0f50ae22acde0c1aac60725.tar.bz2 rneovim-db3c797c6b3ce9c4f0f50ae22acde0c1aac60725.zip |
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
Diffstat (limited to 'src/nvim/ex_cmds2.c')
-rw-r--r-- | src/nvim/ex_cmds2.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c index 484c911a8b..0ecc389699 100644 --- a/src/nvim/ex_cmds2.c +++ b/src/nvim/ex_cmds2.c @@ -4028,12 +4028,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); } } |