mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
provider: improve error message (#9344)
Executing `:python`, and similar commands that rely on `eval_call_provider()`, while the accompanying provider it not available, leads to this error message: E117: Unknown function: provider#python#Call This doesn't say much to a user. Since we introduced `:checkhealth` for this very reason, we now point to it for further diagnosis. Fixes #3577
This commit is contained in:
parent
3c42d7a10a
commit
5fee0be915
@ -3828,7 +3828,12 @@ static void script_host_execute(char *name, exarg_T *eap)
|
||||
// current range
|
||||
tv_list_append_number(args, (int)eap->line1);
|
||||
tv_list_append_number(args, (int)eap->line2);
|
||||
(void)eval_call_provider(name, "execute", args);
|
||||
|
||||
if (!eval_has_provider(name)) {
|
||||
emsgf("No \"%s\" provider found. Run \":checkhealth provider\"", name);
|
||||
} else {
|
||||
(void)eval_call_provider(name, "execute", args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user