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 /cmd-set-option.c | |
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 'cmd-set-option.c')
-rw-r--r-- | cmd-set-option.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cmd-set-option.c b/cmd-set-option.c index 01d691d5..e236b95d 100644 --- a/cmd-set-option.c +++ b/cmd-set-option.c @@ -176,9 +176,7 @@ cmd_set_option_exec(struct cmd *self, struct cmd_q *cmdq) /* Start or stop timers when automatic-rename changed. */ if (strcmp(oe->name, "automatic-rename") == 0) { - for (i = 0; i < ARRAY_LENGTH(&windows); i++) { - if ((w = ARRAY_ITEM(&windows, i)) == NULL) - continue; + RB_FOREACH(w, windows, &windows) { if (options_get_number(&w->options, "automatic-rename")) queue_window_name(w); else if (event_initialized(&w->name_timer)) |