mirror of
https://github.com/vim/vim.git
synced 2025-10-13 06:54:15 -04:00
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.
This commit is contained in:
@@ -1113,8 +1113,10 @@ call_internal_method(
|
||||
typval_T argv[MAX_FUNC_ARGS + 1];
|
||||
|
||||
fi = find_internal_func(name);
|
||||
if (fi < 0 || global_functions[fi].f_argtype == 0)
|
||||
if (fi < 0)
|
||||
return ERROR_UNKNOWN;
|
||||
if (global_functions[fi].f_argtype == 0)
|
||||
return ERROR_NOTMETHOD;
|
||||
if (argcount + 1 < global_functions[fi].f_min_argc)
|
||||
return ERROR_TOOFEW;
|
||||
if (argcount + 1 > global_functions[fi].f_max_argc)
|
||||
|
Reference in New Issue
Block a user