summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/screen.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2015-08-28 17:11:13 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2015-08-28 17:11:13 +0000
commit40b00a0e0da1f1f6adbbc32c5a9ac08f118368e3 (patch)
treec424165c0184156181a977c254f0eb34cfe776a4 /usr.bin/tmux/screen.c
parentd9aff2304ad1d92e7fa0777cf9d777451293c3e8 (diff)
Only set default title to hostname on screens that are being used for a
window pane, no point in calling gethostname() for temporary screens.
Diffstat (limited to 'usr.bin/tmux/screen.c')
-rw-r--r--usr.bin/tmux/screen.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/usr.bin/tmux/screen.c b/usr.bin/tmux/screen.c
index f39ce3708d2..94e093378a2 100644
--- a/usr.bin/tmux/screen.c
+++ b/usr.bin/tmux/screen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: screen.c,v 1.33 2015/01/11 04:14:40 deraadt Exp $ */
+/* $OpenBSD: screen.c,v 1.34 2015/08/28 17:11:12 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -31,14 +31,8 @@ void screen_resize_y(struct screen *, u_int);
void
screen_init(struct screen *s, u_int sx, u_int sy, u_int hlimit)
{
- char host[HOST_NAME_MAX+1];
-
s->grid = grid_create(sx, sy, hlimit);
-
- if (gethostname(host, sizeof(host)) == 0)
- s->title = xstrdup(host);
- else
- s->title = xstrdup("");
+ s->title = xstrdup("");
s->cstyle = 0;
s->ccolour = xstrdup("");