mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
fix(unhide): close floating windows first (#25318)
This commit is contained in:
@@ -3616,8 +3616,11 @@ void ex_buffer_all(exarg_T *eap)
|
||||
}
|
||||
while (true) {
|
||||
tpnext = curtab->tp_next;
|
||||
for (wp = firstwin; wp != NULL; wp = wpnext) {
|
||||
wpnext = wp->w_next;
|
||||
// Try to close floating windows first
|
||||
for (wp = lastwin->w_floating ? lastwin : firstwin; wp != NULL; wp = wpnext) {
|
||||
wpnext = wp->w_floating
|
||||
? wp->w_prev->w_floating ? wp->w_prev : firstwin
|
||||
: (wp->w_next == NULL || wp->w_next->w_floating) ? NULL : wp->w_next;
|
||||
if ((wp->w_buffer->b_nwindows > 1
|
||||
|| ((cmdmod.cmod_split & WSP_VERT)
|
||||
? wp->w_height + wp->w_hsep_height + wp->w_status_height < Rows - p_ch
|
||||
@@ -3632,7 +3635,7 @@ void ex_buffer_all(exarg_T *eap)
|
||||
}
|
||||
// Just in case an autocommand does something strange with
|
||||
// windows: start all over...
|
||||
wpnext = firstwin;
|
||||
wpnext = lastwin->w_floating ? lastwin : firstwin;
|
||||
tpnext = first_tabpage;
|
||||
open_wins = 0;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user