Mercurial > vim
diff src/proto/userfunc.pro @ 30291:61a688be1899 v9.0.0481
patch 9.0.0481: in :def function all closures in loop get the same variables
Commit: https://github.com/vim/vim/commit/8fa745e7be3a791ac25f93ef0227bbc48ade8a37
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Sep 16 19:04:24 2022 +0100
patch 9.0.0481: in :def function all closures in loop get the same variables
Problem: In a :def function all closures in a loop get the same variables.
Solution: Use a separate list of variables for LOADOUTER and STOREOUTER.
Not copied at end of loop yet.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 16 Sep 2022 20:15:03 +0200 |
parents | 0fe61fa4e5d1 |
children | fc0830246f49 |
line wrap: on
line diff
--- a/src/proto/userfunc.pro +++ b/src/proto/userfunc.pro @@ -16,7 +16,7 @@ int func_is_global(ufunc_T *ufunc); int func_requires_g_prefix(ufunc_T *ufunc); int func_name_refcount(char_u *name); void func_clear_free(ufunc_T *fp, int force); -int copy_func(char_u *lambda, char_u *global, ectx_T *ectx); +int copy_lambda_to_global_func(char_u *lambda, char_u *global, short loop_var_idx, short loop_var_count, ectx_T *ectx); int funcdepth_increment(void); void funcdepth_decrement(void); int funcdepth_get(void);