mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-18 01:20:17 +02:00
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:
6
tmux.h
6
tmux.h
@@ -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 *);
|
||||
|
Reference in New Issue
Block a user