mirror of
https://github.com/tmux/tmux.git
synced 2026-06-03 16:46:18 +00:00
Merge branch 'obsd-master'
This commit is contained in:
22
window.c
22
window.c
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user