0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 9.0.2029: Vim9: no support for partials using call()

Problem:  Vim9: no support for partials using call()
Solution: Add support

closes: #13341

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
Yegappan Lakshmanan
2023-10-15 09:53:41 +02:00
committed by Christian Brabandt
parent 5d03525cde
commit 1ace49fb98
4 changed files with 89 additions and 0 deletions

View File

@@ -3540,6 +3540,12 @@ func_call(
funcexe.fe_lastline = curwin->w_cursor.lnum;
funcexe.fe_evaluate = TRUE;
funcexe.fe_partial = partial;
if (partial != NULL)
{
funcexe.fe_object = partial->pt_obj;
if (funcexe.fe_object != NULL)
++funcexe.fe_object->obj_refcount;
}
funcexe.fe_selfdict = selfdict;
r = call_func(name, -1, rettv, argc, argv, &funcexe);
}
@@ -3580,6 +3586,12 @@ call_callback(
CLEAR_FIELD(funcexe);
funcexe.fe_evaluate = TRUE;
funcexe.fe_partial = callback->cb_partial;
if (callback->cb_partial != NULL)
{
funcexe.fe_object = callback->cb_partial->pt_obj;
if (funcexe.fe_object != NULL)
++funcexe.fe_object->obj_refcount;
}
++callback_depth;
ret = call_func(callback->cb_name, len, rettv, argcount, argvars, &funcexe);
--callback_depth;