Skip to content

Commit

Permalink
update the misleading comment in parser_free
Browse files Browse the repository at this point in the history
  • Loading branch information
omar-polo committed Aug 26, 2021
1 parent a18fc6d commit dafcab6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit dafcab6

Please sign in to comment.