0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.4322: Vim9: crash when using funcref with closure

Problem:    Vim9: crash when using funcref with closure.
Solution:   Keep a reference to the funcref that has the outer context.
            (closes #9716)
This commit is contained in:
Bram Moolenaar
2022-02-07 19:56:43 +00:00
parent 92368aad61
commit 7aca5ca676
6 changed files with 54 additions and 5 deletions

View File

@@ -2051,6 +2051,9 @@ struct partial_S
// For a compiled closure: the arguments and local variables scope
outer_T pt_outer;
// For a partial of a partial: use pt_outer values of this partial.
partial_T *pt_outer_partial;
funcstack_T *pt_funcstack; // copy of stack, used after context
// function returns