forked from aniani/vim
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.
This commit is contained in:
@@ -1941,7 +1941,7 @@ popup_create(typval_T *argvars, typval_T *rettv, create_type_T type)
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user