mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.0703: Vim9: closure cannot store value in outer context
Problem: Vim9: closure cannot store value in outer context. Solution: Make storing value in outer context work. Make :disassemble accept a function reference.
This commit is contained in:
@@ -4337,9 +4337,11 @@ set_ref_in_item(
|
||||
partial_T *pt = tv->vval.v_partial;
|
||||
int i;
|
||||
|
||||
// A partial does not have a copyID, because it cannot contain itself.
|
||||
if (pt != NULL)
|
||||
if (pt != NULL && pt->pt_copyID != copyID)
|
||||
{
|
||||
// Didn't see this partial yet.
|
||||
pt->pt_copyID = copyID;
|
||||
|
||||
abort = set_ref_in_func(pt->pt_name, pt->pt_func, copyID);
|
||||
|
||||
if (pt->pt_dict != NULL)
|
||||
|
Reference in New Issue
Block a user