diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2021-08-07 15:10:28 +0100 |
---|---|---|
committer | Sean Dewar <seandewar@users.noreply.github.com> | 2021-08-12 22:35:23 +0100 |
commit | 98dfe4adc48d83e05b2ee039869853760de9c096 (patch) | |
tree | 8855847ce03f092156ac7770b615598e43ffbaff /src/nvim/eval/userfunc.c | |
parent | 287a77ef51a7a12813d3fa6e1c49c595e5951ba5 (diff) | |
download | rneovim-98dfe4adc48d83e05b2ee039869853760de9c096.tar.gz rneovim-98dfe4adc48d83e05b2ee039869853760de9c096.tar.bz2 rneovim-98dfe4adc48d83e05b2ee039869853760de9c096.zip |
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.
https://github.com/vim/vim/commit/9174639a82799011cfa0013cbc4c4709b3833bf0
Diffstat (limited to 'src/nvim/eval/userfunc.c')
-rw-r--r-- | src/nvim/eval/userfunc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c index 9ecde327de..59f07ff486 100644 --- a/src/nvim/eval/userfunc.c +++ b/src/nvim/eval/userfunc.c @@ -1399,6 +1399,9 @@ static void user_func_error(int error, const char_u *name) case ERROR_UNKNOWN: emsg_funcname(N_("E117: Unknown function: %s"), name); break; + case ERROR_NOTMETHOD: + emsg_funcname(N_("E276: Cannot use function as a method: %s"), name); + break; case ERROR_DELETED: emsg_funcname(N_("E933: Function was deleted: %s"), name); break; |