]> granicus.if.org Git - vim/commit
patch 9.0.0485: in :def function all closures in loop get the same variables v9.0.0485
authorBram Moolenaar <Bram@vim.org>
Sat, 17 Sep 2022 14:44:52 +0000 (15:44 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 17 Sep 2022 14:44:52 +0000 (15:44 +0100)
commit0cdfb7ce462393595b0308dcabf343e82f05319d
treebce26a7c87ee0f99bc30006d3c0b02d813afc6da
parent8abb584ab85d5855d810d1c6e2b260f45ec839b7
patch 9.0.0485: 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:   Make a copy of loop variables used in a closure.
src/eval.c
src/proto/vim9execute.pro
src/structs.h
src/testdir/test_vim9_script.vim
src/version.c
src/vim9execute.c