mirror of
https://github.com/neovim/neovim.git
synced 2025-09-10 21:38:19 +00:00
vim-patch:8.1.1863: confusing error when using a builtin function as method
Problem: Confusing error when using a builtin function as method while it
does not support that.
Solution: Add a specific error message.
9174639a82
This commit is contained in:
@@ -199,8 +199,10 @@ int call_internal_method(const char_u *const fname, const int argcount,
|
||||
FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
const VimLFuncDef *const fdef = find_internal_func((const char *)fname);
|
||||
if (fdef == NULL || fdef->base_arg == BASE_NONE) {
|
||||
if (fdef == NULL) {
|
||||
return ERROR_UNKNOWN;
|
||||
} else if (fdef->base_arg == BASE_NONE) {
|
||||
return ERROR_NOTMETHOD;
|
||||
} else if (argcount + 1 < fdef->min_argc) {
|
||||
return ERROR_TOOFEW;
|
||||
} else if (argcount + 1 > fdef->max_argc) {
|
||||
|
Reference in New Issue
Block a user