diff options
author | 2015-04-22 15:30:11 +0000 | |
---|---|---|
committer | 2015-04-22 15:30:11 +0000 | |
commit | ae69181d13bc73f88847f9c1fbbb17ce4f7ff97e (patch) | |
tree | 813ed0247fdea8d344df15f6e8ba96062fc9e871 /usr.bin/tmux/cmd-set-option.c | |
parent | window_index is only used in one place (window_destroy) so inline it there. (diff) | |
download | wireguard-openbsd-ae69181d13bc73f88847f9c1fbbb17ce4f7ff97e.tar.xz wireguard-openbsd-ae69181d13bc73f88847f9c1fbbb17ce4f7ff97e.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 'usr.bin/tmux/cmd-set-option.c')
-rw-r--r-- | usr.bin/tmux/cmd-set-option.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.bin/tmux/cmd-set-option.c b/usr.bin/tmux/cmd-set-option.c index 6c48a310508..f18b5b78557 100644 --- a/usr.bin/tmux/cmd-set-option.c +++ b/usr.bin/tmux/cmd-set-option.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-set-option.c,v 1.71 2014/10/20 22:29:25 nicm Exp $ */ +/* $OpenBSD: cmd-set-option.c,v 1.72 2015/04/22 15:30:11 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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)) |