aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/typval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/eval/typval.c')
-rw-r--r--src/nvim/eval/typval.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c
index 2b44dacca4..c8f89407b9 100644
--- a/src/nvim/eval/typval.c
+++ b/src/nvim/eval/typval.c
@@ -2210,10 +2210,7 @@ bool tv_dict_get_callback(dict_T *const d, const char *const key, const ptrdiff_
/// If the name is wrong give an error message and return true.
int tv_dict_wrong_func_name(dict_T *d, typval_T *tv, const char *name)
{
- return (d == &globvardict
- // || (SCRIPT_ID_VALID(current_sctx.sc_sid)
- // && d == &SCRIPT_ITEM(current_sctx.sc_sid)->sn_vars->sv_dict)
- )
+ return (d == &globvardict || &d->dv_hashtab == get_funccal_local_ht())
&& (tv->v_type == VAR_FUNC || tv->v_type == VAR_PARTIAL)
&& var_wrong_func_name(name, true);
}