From ca48e2048c778ff8a34357ce134441e3690a2a9b Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Mon, 8 Mar 2021 06:59:26 +0000 Subject: [PATCH] Make pterm's default window title more sensible. In the rework last month, term_setup_window_titles made a centralised decision about whether to make the default window title just the application name, or the hostname and application name separated by a dash. Unfortunately it based that decision on whether the hostname was NULL, whereas I'd meant to include a _empty_ hostname as not worth printing. As a result, the default window title for pterm became " - pterm", not just "pterm". Easily fixed. --- terminal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terminal.c b/terminal.c index 7b4384e0..0673623a 100644 --- a/terminal.c +++ b/terminal.c @@ -1775,7 +1775,7 @@ void term_setup_window_titles(Terminal *term, const char *title_hostname) term->window_title = dupstr(conf_title); term->icon_title = dupstr(conf_title); } else { - if (title_hostname) + if (title_hostname && *title_hostname) term->window_title = dupcat(title_hostname, " - ", appname); else term->window_title = dupstr(appname);