Accept 0 time as a shorthand for now to format_expand_time.

This commit is contained in:
nicm
2019-03-14 21:27:26 +00:00
parent 9bd4b96766
commit 1416ceb575
4 changed files with 5 additions and 3 deletions

View File

@ -1537,7 +1537,7 @@ server_client_set_title(struct client *c)
ft = format_create(c, NULL, FORMAT_NONE, 0);
format_defaults(ft, c, NULL, NULL, NULL);
title = format_expand_time(ft, template, time(NULL));
title = format_expand_time(ft, template, 0);
if (c->title == NULL || strcmp(title, c->title) != 0) {
free(c->title);
c->title = xstrdup(title);