Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2026-06-01 19:30:06 +01:00
6 changed files with 44 additions and 16 deletions

View File

@@ -887,8 +887,8 @@ window_pane_previous_by_number(struct window *w, struct window_pane *wp,
int
window_pane_index(struct window_pane *wp, u_int *i)
{
struct window_pane *wq;
struct window *w = wp->window;
struct window_pane *wq;
*i = options_get_number(w->options, "pane-base-index");
TAILQ_FOREACH(wq, &w->panes, entry) {
@@ -901,6 +901,26 @@ window_pane_index(struct window_pane *wp, u_int *i)
return (-1);
}
int
window_pane_zindex(struct window_pane *wp, u_int *i)
{
struct window *w = wp->window;
struct window_pane *wq;
*i = 0;
TAILQ_FOREACH(wq, &w->z_index, zentry) {
if (wq == wp) {
if (~wp->flags & PANE_FLOATING)
(*i)++;
return (0);
}
if (wq->flags & PANE_FLOATING)
(*i)++;
}
return (-1);
}
u_int
window_count_panes(struct window *w, int with_floating)
{