summaryrefslogtreecommitdiffstats
path: root/names.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2012-04-11 07:45:30 +0000
committerNicholas Marriott <nicm@openbsd.org>2012-04-11 07:45:30 +0000
commitc6e0af9bdb11e2a1d95859725ecedbba31eb3380 (patch)
tree44e8eb0ddf1c22ecc06fc62bdf6569ac2c955823 /names.c
parent6703ca8d26a57acc0314f58d6899f383d4235acb (diff)
Turn automatic-rename off properly if turned off by renaming a
window. Reported by Romain Francoise.
Diffstat (limited to 'names.c')
-rw-r--r--names.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/names.c b/names.c
index 469f9123..a20d8cfc 100644
--- a/names.c
+++ b/names.c
@@ -49,7 +49,12 @@ window_name_callback(unused int fd, unused short events, void *data)
struct window *w = data;
char *name, *wname;
- queue_window_name(w); /* stopped when option turned off */
+ if (!options_get_number(&w->options, "automatic-rename")) {
+ if (event_initialized(&w->name_timer))
+ event_del(&w->name_timer);
+ return;
+ }
+ queue_window_name(w);
if (w->active->screen != &w->active->base)
name = NULL;