vim-patch:8.0.0486

Problem:    Crash and endless loop when closing windows in a SessionLoadPost
            autocommand.
Solution:   Check for valid tabpage.  (partly neovim/neovim#6308)

8c752bd6c4

Closes #6308
This commit is contained in:
Justin M. Keyes
2017-03-20 02:48:28 +01:00
parent 06ed7a189b
commit b9e1289819
3 changed files with 121 additions and 11 deletions

View File

@@ -6464,6 +6464,12 @@ win_found:
win_remove(curwin, NULL);
aucmd_win_used = false;
last_status(false); // may need to remove last status line
if (!valid_tabpage_win(curtab)) {
// no valid window in current tabpage
close_tabpage(curtab);
}
restore_snapshot(SNAP_AUCMD_IDX, false);
(void)win_comp_pos(); // recompute window positions
unblock_autocmds();