From dafcab64a97f5daea5add550e3d029faac3765aa Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Thu, 26 Aug 2021 13:22:15 +0000 Subject: [PATCH] update the misleading comment in parser_free --- parser.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/parser.c b/parser.c index 344c70e..3677a37 100644 --- a/parser.c +++ b/parser.c @@ -60,10 +60,13 @@ parser_free(struct tab *tab) r = tab->buffer.page.free(&tab->buffer.page); - /* fallback to the host as title if nothing else */ if (*tab->buffer.page.title != '\0') return r; + /* + * heuristic: see if there is a "tilde user" and use that as + * page title, using the full domain name as fallback. + */ if ((tilde = strstr(tab->hist_cur->h, "/~")) != NULL) { strlcpy(tab->buffer.page.title, tilde+1, sizeof(tab->buffer.page.title));