Revision: 2773
http://tmux.svn.sourceforge.net/tmux/?rev=2773&view=rev
Author: tcunha
Date: 2012-04-10 09:57:08 +0000 (Tue, 10 Apr 2012)
Log Message:
-----------
Sync OpenBSD patchset 1091:
Do not fire name timer when automatic-rename is off, from Tim Ruehsen a
while ago.
Modified Paths:
--------------
trunk/cmd-set-option.c
trunk/names.c
trunk/window.c
Modified: trunk/cmd-set-option.c
===================================================================
--- trunk/cmd-set-option.c 2012-04-10 09:56:04 UTC (rev 2772)
+++ trunk/cmd-set-option.c 2012-04-10 09:57:08 UTC (rev 2773)
@@ -87,6 +87,7 @@
struct winlink *wl;
struct client *c;
struct options *oo;
+ struct window *w;
const char *optstr, *valstr;
u_int i;
@@ -147,6 +148,18 @@
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. */
recalculate_sizes();
for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
Modified: trunk/names.c
===================================================================
--- trunk/names.c 2012-04-10 09:56:04 UTC (rev 2772)
+++ trunk/names.c 2012-04-10 09:57:08 UTC (rev 2773)
@@ -49,9 +49,7 @@
struct window *w = data;
char *name, *wname;
- queue_window_name(w); /* XXX even if the option is off? */
- if (!options_get_number(&w->options, "automatic-rename"))
- return;
+ queue_window_name(w); /* stopped when option turned off */
if (w->active->screen != &w->active->base)
name = NULL;
Modified: trunk/window.c
===================================================================
--- trunk/window.c 2012-04-10 09:56:04 UTC (rev 2772)
+++ trunk/window.c 2012-04-10 09:57:08 UTC (rev 2773)
@@ -294,9 +294,9 @@
w->sx = sx;
w->sy = sy;
- queue_window_name(w);
-
options_init(&w->options, &global_w_options);
+ if (options_get_number(&w->options, "automatic-rename"))
+ queue_window_name(w);
for (i = 0; i < ARRAY_LENGTH(&windows); i++) {
if (ARRAY_ITEM(&windows, i) == NULL) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs