mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 02:16:31 +00:00
vim-patch:8.2.4609: :unhide does not check for failing to close a window (#25317)
Problem: :unhide does not check for failing to close a window.
Solution: When closing a window fails continue with the next one. Do not
try closing the autocmd window. (closes vim/vim#9984)
6f2465d336
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -1341,7 +1341,6 @@ void aucmd_restbuf(aco_save_T *aco)
|
||||
if (aco->use_aucmd_win_idx >= 0) {
|
||||
win_T *awp = aucmd_win[aco->use_aucmd_win_idx].auc_win;
|
||||
|
||||
curbuf->b_nwindows--;
|
||||
// Find "awp", it can't be closed, but it may be in another tab page.
|
||||
// Do not trigger autocommands here.
|
||||
block_autocmds();
|
||||
@@ -1357,7 +1356,7 @@ void aucmd_restbuf(aco_save_T *aco)
|
||||
}
|
||||
}
|
||||
win_found:
|
||||
;
|
||||
curbuf->b_nwindows--;
|
||||
const bool save_stop_insert_mode = stop_insert_mode;
|
||||
// May need to stop Insert mode if we were in a prompt buffer.
|
||||
leaving_window(curwin);
|
||||
|
Reference in New Issue
Block a user