Change the windows array into an RB tree and fix some places where we

were only looking at the first winlink for a window in a session.
This commit is contained in:
nicm
2015-04-22 15:30:11 +00:00
parent 89e80cabd5
commit 8d66f4fba4
7 changed files with 50 additions and 90 deletions

6
tmux.h
View File

@@ -983,8 +983,10 @@ struct window {
struct options options;
u_int references;
RB_ENTRY(window) entry;
};
ARRAY_DECL(windows, struct window *);
RB_HEAD(windows, window);
/* Entry on local window list. */
struct winlink {
@@ -2121,6 +2123,8 @@ void screen_reflow(struct screen *, u_int);
/* window.c */
extern struct windows windows;
extern struct window_pane_tree all_window_panes;
int window_cmp(struct window *, struct window *);
RB_PROTOTYPE(windows, window, entry, window_cmp);
int winlink_cmp(struct winlink *, struct winlink *);
RB_PROTOTYPE(winlinks, winlink, entry, winlink_cmp);
int window_pane_cmp(struct window_pane *, struct window_pane *);