mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 01:02:09 +00:00
fix(window): handle closing the only non-float in other tabpage
Problem: No check for closing the only non-floating window in a non-current tabpage that contains floats. This can lead to a tabpage that contains only floats, causing crashes. Solution: Copy the relevant check from win_close to win_close_othertab. Fix some uncovered issues. Closes #34943 Fixes #31236 Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
@@ -4919,7 +4919,7 @@ void ex_win_close(int forceit, win_T *win, tabpage_T *tp)
|
||||
if (tp == NULL) {
|
||||
win_close(win, !need_hide && !buf_hide(buf), forceit);
|
||||
} else {
|
||||
win_close_othertab(win, !need_hide && !buf_hide(buf), tp);
|
||||
win_close_othertab(win, !need_hide && !buf_hide(buf), tp, forceit);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user