config: add locked-title=no|yes

Closes #386
This commit is contained in:
Daniel Eklöf 2021-07-04 17:59:40 +02:00
parent 07652d3b9e
commit fcb60abc13
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
7 changed files with 22 additions and 0 deletions

View file

@ -2634,9 +2634,13 @@ term_xcursor_update(struct terminal *term)
void
term_set_window_title(struct terminal *term, const char *title)
{
if (term->conf->locked_title && term->window_title_has_been_set)
return;
free(term->window_title);
term->window_title = xstrdup(title);
render_refresh_title(term);
term->window_title_has_been_set = true;
}
void