aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 068a1b8ed4..5d10002846 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -10054,8 +10054,7 @@ static void common_function(typval_T *argvars, typval_T *rettv,
use_string = true;
}
- if (((use_string && vim_strchr(s, AUTOLOAD_CHAR) == NULL)
- || is_funcref)) {
+ if (((use_string && vim_strchr(s, AUTOLOAD_CHAR) == NULL) || is_funcref)) {
name = s;
trans_name = trans_function_name(&name, false,
TFN_INT | TFN_QUIET | TFN_NO_AUTOLOAD
@@ -10064,7 +10063,8 @@ static void common_function(typval_T *argvars, typval_T *rettv,
s = NULL;
}
}
- if (s == NULL || *s == NUL || (use_string && ascii_isdigit(*s))) {
+ if (s == NULL || *s == NUL || (use_string && ascii_isdigit(*s))
+ || (is_funcref && trans_name == NULL)) {
EMSG2(_(e_invarg2), s);
} else if (trans_name != NULL
&& (is_funcref ? find_func(trans_name) == NULL