'titleold': simplify behavior

- default 'titleold' to empty
- set title on exit if 'title' is enabled and 'titleold' is non-empty
- update docs
This commit is contained in:
Justin M. Keyes
2017-10-05 09:14:18 +02:00
parent 5f4d2edeee
commit 70e84a7c4c
6 changed files with 9 additions and 18 deletions

View File

@@ -3069,14 +3069,11 @@ static bool ti_change(char_u *str, char_u **last)
/// Set current window title
void resettitle(void)
{
// if icon change, should the title be reset too?
if (p_icon) {
ui_call_set_title(cstr_as_string((char *)lasttitle));
ui_call_set_icon(cstr_as_string((char *)lasticon));
} else if (p_title) {
ui_call_set_title(cstr_as_string((char *)lasttitle));
}
if (p_title || p_icon) {
ui_call_set_title(cstr_as_string((char *)lasttitle));
ui_flush();
}
}