Mercurial > vim
comparison src/ex_cmds.c @ 3365:9ccdc4a69d8f v7.3.449
updated for version 7.3.449
Problem: Crash when a BufWinLeave autocommand closes the only other window.
(Daniel Hunt)
Solution: Abort closing a buffer when it becomes the only one.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 22 Feb 2012 14:58:37 +0100 |
parents | 48252b5fd170 |
children | 8e0fe5a723ad |
comparison
equal
deleted
inserted
replaced
3364:e8d5db3a6d4f | 3365:9ccdc4a69d8f |
---|---|
3385 buf_copy_options(buf, BCO_ENTER); | 3385 buf_copy_options(buf, BCO_ENTER); |
3386 | 3386 |
3387 /* close the link to the current buffer */ | 3387 /* close the link to the current buffer */ |
3388 u_sync(FALSE); | 3388 u_sync(FALSE); |
3389 close_buffer(oldwin, curbuf, | 3389 close_buffer(oldwin, curbuf, |
3390 (flags & ECMD_HIDE) ? 0 : DOBUF_UNLOAD); | 3390 (flags & ECMD_HIDE) ? 0 : DOBUF_UNLOAD, FALSE); |
3391 | 3391 |
3392 #ifdef FEAT_AUTOCMD | 3392 #ifdef FEAT_AUTOCMD |
3393 /* Autocommands may open a new window and leave oldwin open | 3393 /* Autocommands may open a new window and leave oldwin open |
3394 * which leads to crashes since the above call sets | 3394 * which leads to crashes since the above call sets |
3395 * oldwin->w_buffer to NULL. */ | 3395 * oldwin->w_buffer to NULL. */ |