comparison src/userfunc.c @ 19281:9fcdeaa18bd1 v8.2.0199

patch 8.2.0199: Vim9 script commands not sufficiently tested Commit: https://github.com/vim/vim/commit/0f18b6d17baa7d33f209a3184726a162c2bb7ed8 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 2 17:22:27 2020 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Sun, 02 Feb 2020 17:30:03 +0100
parents a8d2d3c8f0b3
children 86665583dc83
comparison
equal deleted inserted replaced
19280:669bd4306d67 19281:9fcdeaa18bd1
1058 func_ptr_ref(fp); 1058 func_ptr_ref(fp);
1059 1059
1060 if (fp->uf_dfunc_idx >= 0) 1060 if (fp->uf_dfunc_idx >= 0)
1061 { 1061 {
1062 estack_push_ufunc(ETYPE_UFUNC, fp, 1); 1062 estack_push_ufunc(ETYPE_UFUNC, fp, 1);
1063 save_current_sctx = current_sctx;
1064 current_sctx = fp->uf_script_ctx;
1063 1065
1064 // Execute the compiled function. 1066 // Execute the compiled function.
1065 call_def_function(fp, argcount, argvars, rettv); 1067 call_def_function(fp, argcount, argvars, rettv);
1066 --depth; 1068 --depth;
1067 current_funccal = fc->caller; 1069 current_funccal = fc->caller;
1068 1070
1069 estack_pop(); 1071 estack_pop();
1072 current_sctx = save_current_sctx;
1070 free_funccal(fc); 1073 free_funccal(fc);
1071 return; 1074 return;
1072 } 1075 }
1073 1076
1074 if (STRNCMP(fp->uf_name, "<lambda>", 8) == 0) 1077 if (STRNCMP(fp->uf_name, "<lambda>", 8) == 0)