From 3173d07564e7cdf0834099a379f0faf480c76224 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 29 Nov 2022 18:20:11 +0800 Subject: vim-patch:9.0.0965: using one window for executing autocommands is insufficient Problem: Using one window for executing autocommands is insufficient. Solution: Use up to five windows for executing autocommands. https://github.com/vim/vim/commit/e76062c078debed0df818f70e4db14ad7a7cb53a N/A patches for version.c: vim-patch:9.0.0966: some compilers don't allow a declaration after a label Problem: Some compilers don't allow a declaration after a label. Solution: Move the declaration to the start of the block. (John Marriott) https://github.com/vim/vim/commit/f86490ed4fdab213a28f667abd055c023a73d645 Co-authored-by: Bram Moolenaar --- src/nvim/eval.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/nvim/eval.c') diff --git a/src/nvim/eval.c b/src/nvim/eval.c index dfa9238327..d316d60efa 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -4174,8 +4174,10 @@ bool garbage_collect(bool testing) ABORTING(set_ref_in_fmark)(wp->w_jumplist[i].fmark, copyID); } } - if (aucmd_win != NULL) { - ABORTING(set_ref_in_item)(&aucmd_win->w_winvar.di_tv, copyID, NULL, NULL); + for (int i = 0; i < AUCMD_WIN_COUNT; i++) { + if (aucmd_win[i].auc_win_used) { + ABORTING(set_ref_in_item)(&aucmd_win[i].auc_win->w_winvar.di_tv, copyID, NULL, NULL); + } } // registers (ShaDa additional data) -- cgit From 95f5cf96912727a1ede055211645ac9779f3da44 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 29 Nov 2022 19:02:29 +0800 Subject: vim-patch:9.0.0967: leaking memory from autocmd windows Problem: Leaking memory from autocmd windows. Solution: Free window when auc_win is not NULL. https://github.com/vim/vim/commit/84497cd06f06516f6ce727ea00c47792ce16dc70 Co-authored-by: Bram Moolenaar --- src/nvim/eval.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/nvim/eval.c') diff --git a/src/nvim/eval.c b/src/nvim/eval.c index d316d60efa..c4afd6934c 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -4174,8 +4174,9 @@ bool garbage_collect(bool testing) ABORTING(set_ref_in_fmark)(wp->w_jumplist[i].fmark, copyID); } } + // window-local variables in autocmd windows for (int i = 0; i < AUCMD_WIN_COUNT; i++) { - if (aucmd_win[i].auc_win_used) { + if (aucmd_win[i].auc_win != NULL) { ABORTING(set_ref_in_item)(&aucmd_win[i].auc_win->w_winvar.di_tv, copyID, NULL, NULL); } } -- cgit