Merge branch 'obsd-master'

Conflicts:
	cmd-pipe-pane.c
This commit is contained in:
Thomas Adam
2015-02-06 19:05:56 +00:00
35 changed files with 308 additions and 267 deletions

View File

@ -782,19 +782,25 @@ server_client_check_redraw(struct client *c)
void
server_client_set_title(struct client *c)
{
struct session *s = c->session;
const char *template;
char *title;
struct session *s = c->session;
const char *template;
char *title;
struct format_tree *ft;
template = options_get_string(&s->options, "set-titles-string");
title = status_replace(c, NULL, NULL, NULL, template, time(NULL), 1);
ft = format_create();
format_defaults(ft, c, NULL, NULL, NULL);
title = format_expand_time(ft, template, time(NULL));
if (c->title == NULL || strcmp(title, c->title) != 0) {
free(c->title);
c->title = xstrdup(title);
tty_set_title(&c->tty, c->title);
}
free(title);
format_free(ft);
}
/* Dispatch message from client. */