diff src/popupwin.c @ 23869:5a4f9c5c1b99 v8.2.2476

patch 8.2.2476: using freed memory when splitting window while closing buffer Commit: https://github.com/vim/vim/commit/983d83ff1cd796ff321074335fa53fbe7ac45a46 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 7 12:12:43 2021 +0100 patch 8.2.2476: using freed memory when splitting window while closing buffer Problem: Using freed memory when using an autocommand to split a window while a buffer is being closed. Solution: Disallow splitting when the buffer has b_locked_split set.
author Bram Moolenaar <Bram@vim.org>
date Sun, 07 Feb 2021 12:15:03 +0100
parents 12b446696927
children 3033dade50ca
line wrap: on
line diff
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -1941,7 +1941,7 @@ popup_create(typval_T *argvars, typval_T
 	buf->b_p_ul = -1;	// no undo
 	buf->b_p_swf = FALSE;   // no swap file
 	buf->b_p_bl = FALSE;    // unlisted buffer
-	buf->b_locked = TRUE;
+	buf->b_locked = TRUE;	// prevent deleting the buffer
 
 	// Avoid that 'buftype' is reset when this buffer is entered.
 	buf->b_p_initialized = TRUE;