fix(float): properly find last window of tabpage (#30571)

This commit is contained in:
zeertzjq
2024-09-29 18:38:17 +08:00
committed by GitHub
parent 006323dd70
commit df915f3afc
2 changed files with 17 additions and 1 deletions

View File

@@ -59,7 +59,7 @@ win_T *win_new_float(win_T *wp, bool last, WinConfig fconfig, Error *err)
if (!tp) {
return NULL;
}
tp_last = tp->tp_lastwin;
tp_last = tp == curtab ? lastwin : tp->tp_lastwin;
while (tp_last->w_floating && tp_last->w_prev) {
tp_last = tp_last->w_prev;
}