mirror of
https://github.com/neovim/neovim.git
synced 2025-12-08 07:32:40 +00:00
vim-patch:8.2.3097: crash when using "quit" at recovery prompt
Problem: Crash when using "quit" at recovery prompt and autocommands are
triggered.
Solution: Block autocommands when creating an empty buffer to use as the
current buffer. (closes vim/vim#8506)
1d97efce0c
This commit is contained in:
@@ -901,7 +901,10 @@ void handle_swap_exists(bufref_T *old_curbuf)
|
||||
if (old_curbuf == NULL
|
||||
|| !bufref_valid(old_curbuf)
|
||||
|| old_curbuf->br_buf == curbuf) {
|
||||
// Block autocommands here because curwin->w_buffer is NULL.
|
||||
block_autocmds();
|
||||
buf = buflist_new(NULL, NULL, 1L, BLN_CURBUF | BLN_LISTED);
|
||||
unblock_autocmds();
|
||||
} else {
|
||||
buf = old_curbuf->br_buf;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user