Mercurial > vim
diff src/globals.h @ 5816:29eb4c2a33ac v7.4.251
updated for version 7.4.251
Problem: Crash when BufAdd autocommand wipes out the buffer.
Solution: Check for buffer to still be valid. Postpone freeing the buffer
structure. (Hirohito Higashi)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 06 Apr 2014 20:45:43 +0200 |
parents | 50dbef5e774a |
children | 63e7cc62402d |
line wrap: on
line diff
--- a/src/globals.h +++ b/src/globals.h @@ -386,6 +386,11 @@ EXTERN int keep_filetype INIT(= FALSE); /* When deleting the current buffer, another one must be loaded. If we know * 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. */ +EXTERN buf_T *au_pending_free_buf INIT(= NULL); #endif #ifdef FEAT_MOUSE