patch 8.2.4429: using script-local function from the wrong script
Problem: Using script-local function from the wrong script when using a
partial. (Yegappan Lakshmanan)
Solution: Include the script ID in the partial name.
diff --git a/src/evalfunc.c b/src/evalfunc.c
index ce51fc0..cb038e4 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -570,7 +570,7 @@
|| 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 @@
// 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);