=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/window.c,v retrieving revision 1.139 retrieving revision 1.140 diff -u -r1.139 -r1.140 --- src/usr.bin/tmux/window.c 2015/08/28 16:10:46 1.139 +++ src/usr.bin/tmux/window.c 2015/08/28 17:11:12 1.140 @@ -1,4 +1,4 @@ -/* $OpenBSD: window.c,v 1.139 2015/08/28 16:10:46 nicm Exp $ */ +/* $OpenBSD: window.c,v 1.140 2015/08/28 17:11:12 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -704,6 +704,7 @@ window_pane_create(struct window *w, u_int sx, u_int sy, u_int hlimit) { struct window_pane *wp; + char host[HOST_NAME_MAX + 1]; wp = xcalloc(1, sizeof *wp); wp->window = w; @@ -739,6 +740,9 @@ screen_init(&wp->base, sx, sy, hlimit); wp->screen = &wp->base; + + if (gethostname(host, sizeof host) == 0) + screen_set_title(&wp->base, host); input_init(wp);