mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
updated for version 7.0g04
This commit is contained in:
14
src/eval.c
14
src/eval.c
@@ -8791,7 +8791,11 @@ f_exists(argvars, rettv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (*p == '&' || *p == '+') /* option */
|
else if (*p == '&' || *p == '+') /* option */
|
||||||
|
{
|
||||||
n = (get_option_tv(&p, NULL, TRUE) == OK);
|
n = (get_option_tv(&p, NULL, TRUE) == OK);
|
||||||
|
if (*skipwhite(p) != NUL)
|
||||||
|
n = FALSE; /* trailing garbage */
|
||||||
|
}
|
||||||
else if (*p == '*') /* internal or user defined function */
|
else if (*p == '*') /* internal or user defined function */
|
||||||
{
|
{
|
||||||
n = function_exists(p + 1);
|
n = function_exists(p + 1);
|
||||||
@@ -8830,6 +8834,8 @@ f_exists(argvars, rettv)
|
|||||||
clear_tv(&tv);
|
clear_tv(&tv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (*p != NUL)
|
||||||
|
n = FALSE;
|
||||||
|
|
||||||
vim_free(tofree);
|
vim_free(tofree);
|
||||||
}
|
}
|
||||||
@@ -19109,14 +19115,18 @@ function_exists(name)
|
|||||||
int n = FALSE;
|
int n = FALSE;
|
||||||
|
|
||||||
p = trans_function_name(&nm, FALSE, TFN_INT|TFN_QUIET, NULL);
|
p = trans_function_name(&nm, FALSE, TFN_INT|TFN_QUIET, NULL);
|
||||||
if (p != NULL)
|
nm = skipwhite(nm);
|
||||||
|
|
||||||
|
/* Only accept "funcname", "funcname ", "funcname (..." and
|
||||||
|
* "funcname(...", not "funcname!...". */
|
||||||
|
if (p != NULL && (*nm == NUL || *nm == '('))
|
||||||
{
|
{
|
||||||
if (builtin_function(p))
|
if (builtin_function(p))
|
||||||
n = (find_internal_func(p) >= 0);
|
n = (find_internal_func(p) >= 0);
|
||||||
else
|
else
|
||||||
n = (find_func(p) != NULL);
|
n = (find_func(p) != NULL);
|
||||||
vim_free(p);
|
|
||||||
}
|
}
|
||||||
|
vim_free(p);
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user