summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/names.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2015-08-28 07:49:24 +0000
committernicm <nicm@openbsd.org>2015-08-28 07:49:24 +0000
commitdbd9724db36eb23cad49927d9554867f6ed47cea (patch)
treea3007af5a44d053d189713204bf19662836b971c /usr.bin/tmux/names.c
parentAdd obviously missing #includes (diff)
downloadwireguard-openbsd-dbd9724db36eb23cad49927d9554867f6ed47cea.tar.xz
wireguard-openbsd-dbd9724db36eb23cad49927d9554867f6ed47cea.zip
Only do the automatic-rename dance if the pane has changed (seen output,
or new active pane).
Diffstat (limited to 'usr.bin/tmux/names.c')
-rw-r--r--usr.bin/tmux/names.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/tmux/names.c b/usr.bin/tmux/names.c
index 29bc2c4473b..56ae335a2c7 100644
--- a/usr.bin/tmux/names.c
+++ b/usr.bin/tmux/names.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: names.c,v 1.24 2015/02/05 10:29:43 nicm Exp $ */
+/* $OpenBSD: names.c,v 1.25 2015/08/28 07:49:24 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -50,6 +50,10 @@ window_name_callback(unused int fd, unused short events, void *data)
if (w->active == NULL)
return;
+ if (~w->active->flags & PANE_CHANGED)
+ return;
+ w->active->flags &= ~PANE_CHANGED;
+
if (!options_get_number(&w->options, "automatic-rename")) {
if (event_initialized(&w->name_timer))
event_del(&w->name_timer);