=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-set-option.c,v retrieving revision 1.54 retrieving revision 1.55 diff -c -r1.54 -r1.55 *** src/usr.bin/tmux/cmd-set-option.c 2012/03/17 21:33:33 1.54 --- src/usr.bin/tmux/cmd-set-option.c 2012/04/08 06:47:26 1.55 *************** *** 1,4 **** ! /* $OpenBSD: cmd-set-option.c,v 1.54 2012/03/17 21:33:33 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: cmd-set-option.c,v 1.55 2012/04/08 06:47:26 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 87,92 **** --- 87,93 ---- struct winlink *wl; struct client *c; struct options *oo; + struct window *w; const char *optstr, *valstr; u_int i; *************** *** 145,150 **** --- 146,163 ---- } else { if (cmd_set_option_set(self, ctx, oe, oo, valstr) != 0) return (-1); + } + + /* 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; + if (options_get_number(&w->options, "automatic-rename")) + queue_window_name(w); + else if (event_initialized(&w->name_timer)) + evtimer_del(&w->name_timer); + } } /* Update sizes and redraw. May not need it but meh. */