diff options
author | nicm <nicm> | 2015-04-22 15:30:11 +0000 |
---|---|---|
committer | nicm <nicm> | 2015-04-22 15:30:11 +0000 |
commit | 8d66f4fba4972d45be64d108c7c8d952f85016a8 (patch) | |
tree | e4b4d2745922796fa06923b7d18e77b300daee59 /tmux.h | |
parent | 89e80cabd56bf2f7fa783575fe9b1f6192fade42 (diff) | |
download | rtmux-8d66f4fba4972d45be64d108c7c8d952f85016a8.tar.gz rtmux-8d66f4fba4972d45be64d108c7c8d952f85016a8.tar.bz2 rtmux-8d66f4fba4972d45be64d108c7c8d952f85016a8.zip |
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.
Diffstat (limited to 'tmux.h')
-rw-r--r-- | tmux.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 *); |