summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/names.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2009-10-10 15:23:13 +0000
committernicm <nicm@openbsd.org>2009-10-10 15:23:13 +0000
commit653295833f3564178b38873ca0cf2e620606711a (patch)
tree76d23185ee2a25aba3db2277eda5095be8e7e9a6 /usr.bin/tmux/names.c
parentRather than running status-left, status-right and window title #() with popen (diff)
downloadwireguard-openbsd-653295833f3564178b38873ca0cf2e620606711a.tar.xz
wireguard-openbsd-653295833f3564178b38873ca0cf2e620606711a.zip
When a window is zombified and automatic-rename is on, append [dead] to the
name.
Diffstat (limited to 'usr.bin/tmux/names.c')
-rw-r--r--usr.bin/tmux/names.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/tmux/names.c b/usr.bin/tmux/names.c
index 1cc4c759cb6..e21d7f3cad6 100644
--- a/usr.bin/tmux/names.c
+++ b/usr.bin/tmux/names.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: names.c,v 1.7 2009/09/20 14:58:12 nicm Exp $ */
+/* $OpenBSD: names.c,v 1.8 2009/10/10 15:23:13 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -73,6 +73,12 @@ set_window_names(void)
xfree(name);
}
+ if (w->active->fd == -1) {
+ xasprintf(&name, "%s[dead]", wname);
+ xfree(wname);
+ wname = name;
+ }
+
if (strcmp(wname, w->name) == 0)
xfree(wname);
else {