summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2012-04-11 07:45:30 +0000
committernicm <nicm@openbsd.org>2012-04-11 07:45:30 +0000
commit91e805305873c59ade38b8c0eccf06a1cfa511ad (patch)
treeb510f81345432425a719329d99ffb7fa26c63ce1
parentStop accepting new clients for 1 second on EMFILE/ENFILE. Based on (diff)
downloadwireguard-openbsd-91e805305873c59ade38b8c0eccf06a1cfa511ad.tar.xz
wireguard-openbsd-91e805305873c59ade38b8c0eccf06a1cfa511ad.zip
Turn automatic-rename off properly if turned off by renaming a
window. Reported by Romain Francoise.
-rw-r--r--usr.bin/tmux/names.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/tmux/names.c b/usr.bin/tmux/names.c
index 167ae71852c..64fc973137f 100644
--- a/usr.bin/tmux/names.c
+++ b/usr.bin/tmux/names.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: names.c,v 1.14 2012/04/08 06:47:26 nicm Exp $ */
+/* $OpenBSD: names.c,v 1.15 2012/04/11 07:45:30 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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;