=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/screen.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- src/usr.bin/tmux/screen.c 2010/02/06 17:35:01 1.14 +++ src/usr.bin/tmux/screen.c 2010/04/04 23:05:15 1.15 @@ -1,4 +1,4 @@ -/* $OpenBSD: screen.c,v 1.14 2010/02/06 17:35:01 nicm Exp $ */ +/* $OpenBSD: screen.c,v 1.15 2010/04/04 23:05:15 beck Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -31,9 +31,14 @@ void screen_init(struct screen *s, u_int sx, u_int sy, u_int hlimit) { + char hn[MAXHOSTNAMELEN]; + s->grid = grid_create(sx, sy, hlimit); - s->title = xstrdup(""); + if (gethostname(hn, MAXHOSTNAMELEN) == 0) + s->title = xstrdup(hn); + else + s->title = xstrdup(""); s->tabs = NULL;