mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 07:28:34 +00:00
vim-patch:7.4.320
Problem: Possible crash when an BufLeave autocommand deletes the buffer. Solution: Check for the window pointer being valid. Postpone freeing the window until autocommands are done. (Yasuhiro Matsumoto) https://code.google.com/p/vim/source/detail?r=v7-4-320
This commit is contained in:
@@ -468,10 +468,12 @@ EXTERN int keep_filetype INIT(= FALSE); /* value for did_filetype when
|
||||
* which one is preferred, au_new_curbuf is set to it */
|
||||
EXTERN buf_T *au_new_curbuf INIT(= NULL);
|
||||
|
||||
// When deleting the buffer and autocmd_busy is TRUE, do not free the buffer
|
||||
// but link it in the list starting with au_pending_free_buf, using b_next.
|
||||
// Free the buffer when autocmd_busy is set to FALSE.
|
||||
// When deleting a buffer/window and autocmd_busy is TRUE, do not free the
|
||||
// buffer/window. but link it in the list starting with
|
||||
// au_pending_free_buf/ap_pending_free_win, using b_next/w_next.
|
||||
// Free the buffer/window when autocmd_busy is being set to FALSE.
|
||||
EXTERN buf_T *au_pending_free_buf INIT(= NULL);
|
||||
EXTERN win_T *au_pending_free_win INIT(= NULL);
|
||||
|
||||
/*
|
||||
* Mouse coordinates, set by check_termcode()
|
||||
|
Reference in New Issue
Block a user