aboutsummaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'window.c')
-rw-r--r--window.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/window.c b/window.c
index 77c7a633..ff3ccfb8 100644
--- a/window.c
+++ b/window.c
@@ -704,6 +704,7 @@ struct window_pane *
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;
@@ -740,6 +741,9 @@ window_pane_create(struct window *w, u_int sx, u_int sy, u_int hlimit)
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);
return (wp);