Add a helper to replace a loop.

This commit is contained in:
Nicholas Marriott
2026-05-27 20:33:03 +01:00
parent 20cf0d3ea9
commit c62b27f014
3 changed files with 16 additions and 15 deletions

View File

@@ -461,6 +461,18 @@ window_pane_send_resize(struct window_pane *wp, u_int sx, u_int sy)
fatal("ioctl failed");
}
int
window_has_floating_panes(struct window *w)
{
struct window_pane *wp;
TAILQ_FOREACH(wp, &w->panes, entry) {
if (wp->flags & PANE_FLOATING)
return (1);
}
return (0);
}
int
window_has_pane(struct window *w, struct window_pane *wp)
{