summaryrefslogtreecommitdiffstats
path: root/src/evalfunc.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-02-21 13:13:50 +0000
committerBram Moolenaar <Bram@vim.org>2022-02-21 13:13:50 +0000
commitc2f17f7e64bb1bf872dbc6f3b8f0d8751e275287 (patch)
tree229b6c9923d3eb383f9dbd254104a661c348b42d /src/evalfunc.c
parent0f6e28f686dbb59ab3b562408ab9b2234797b9b1 (diff)
patch 8.2.4429: using script-local function from the wrong scriptv8.2.4429
Problem: Using script-local function from the wrong script when using a partial. (Yegappan Lakshmanan) Solution: Include the script ID in the partial name.
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r--src/evalfunc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c
index ce51fc017d..cb038e4c8d 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -570,7 +570,7 @@ arg_map_func(type_T *type, type_T *decl_type UNUSED, argcontext_T *context)
|| context->arg_types[0].type_curr->tt_type == VAR_BLOB
|| context->arg_types[0].type_curr->tt_type == VAR_LIST)
args[0] = &t_number;
- else if (context->arg_types[0].type_curr->tt_type == VAR_DICT)
+ else if (context->arg_types[0].type_decl->tt_type == VAR_DICT)
args[0] = &t_string;
if (args[0] != NULL)
args[1] = expected_ret;
@@ -4366,6 +4366,8 @@ common_function(typval_T *argvars, typval_T *rettv, int is_funcref)
// would also work, but some plugins depend on the name being
// printable text.
name = get_scriptlocal_funcname(s);
+ else if (trans_name != NULL && *trans_name == K_SPECIAL)
+ name = alloc_printable_func_name(trans_name);
else
name = vim_strsave(s);