Mercurial > vim
diff src/evalfunc.c @ 9717:6226de5f8137 v7.4.2134
commit https://github.com/vim/vim/commit/b54c3ff3174dbb5dfbfcabdf95200b047beaa644
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 31 14:11:58 2016 +0200
patch 7.4.2134
Problem: No error for using function() badly.
Solution: Check for passing wrong function name. (Ken Takata)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 31 Jul 2016 14:15:05 +0200 |
parents | be4aaef2651c |
children | 80ac9cf77c9b |
line wrap: on
line diff
--- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -2845,7 +2845,7 @@ f_exists(typval_T *argvars, typval_T *re } else if (*p == '*') /* internal or user defined function */ { - n = function_exists(p + 1); + n = function_exists(p + 1, FALSE); } else if (*p == ':') { @@ -3577,7 +3577,7 @@ f_function(typval_T *argvars, typval_T * EMSG2(_(e_invarg2), s); /* Don't check an autoload name for existence here. */ else if (use_string && vim_strchr(s, AUTOLOAD_CHAR) == NULL - && !function_exists(s)) + && !function_exists(s, TRUE)) EMSG2(_("E700: Unknown function: %s"), s); else {