diff src/structs.h @ 27591:d91be28bbdbb v8.2.4322

patch 8.2.4322: Vim9: crash when using funcref with closure Commit: https://github.com/vim/vim/commit/7aca5ca6763e50d2c23953b20e30fca7457c9abf Author: Bram Moolenaar <Bram@vim.org> Date: Mon Feb 7 19:56:43 2022 +0000 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)
author Bram Moolenaar <Bram@vim.org>
date Mon, 07 Feb 2022 21:00:02 +0100
parents fb4c30606b4a
children ae38d2e81fca
line wrap: on
line diff
--- a/src/structs.h
+++ b/src/structs.h
@@ -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