0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.0199: Vim9 script commands not sufficiently tested

Problem:    Vim9 script commands not sufficiently tested.
Solution:   Add more tests.  Fix script-local function use.
This commit is contained in:
Bram Moolenaar
2020-02-02 17:22:27 +01:00
parent 43c60eda2a
commit 0f18b6d17b
4 changed files with 58 additions and 11 deletions

View File

@@ -1060,6 +1060,8 @@ call_user_func(
if (fp->uf_dfunc_idx >= 0)
{
estack_push_ufunc(ETYPE_UFUNC, fp, 1);
save_current_sctx = current_sctx;
current_sctx = fp->uf_script_ctx;
// Execute the compiled function.
call_def_function(fp, argcount, argvars, rettv);
@@ -1067,6 +1069,7 @@ call_user_func(
current_funccal = fc->caller;
estack_pop();
current_sctx = save_current_sctx;
free_funccal(fc);
return;
}