mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 00:18:33 +00:00
'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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
@@ -279,7 +279,6 @@ EXTERN int need_wait_return INIT(= 0); /* need to wait for return later */
|
||||
EXTERN int did_wait_return INIT(= FALSE); /* wait_return() was used and
|
||||
nothing written since then */
|
||||
EXTERN int need_maketitle INIT(= TRUE); /* call maketitle() soon */
|
||||
EXTERN int did_enable_title INIT(= FALSE); /* did set title */
|
||||
|
||||
EXTERN int quit_more INIT(= FALSE); /* 'q' hit at "--more--" msg */
|
||||
#if defined(UNIX) || defined(MACOS_X)
|
||||
|
@@ -1953,7 +1953,6 @@ did_set_title (
|
||||
if (starting != NO_SCREEN) {
|
||||
maketitle();
|
||||
resettitle();
|
||||
did_enable_title = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -2498,7 +2498,7 @@ return {
|
||||
no_mkrc=true,
|
||||
vi_def=true,
|
||||
varname='p_titleold',
|
||||
defaults={if_true={vi=N_("Thanks for flying Vim")}}
|
||||
defaults={if_true={vi=N_("")}}
|
||||
},
|
||||
{
|
||||
full_name='titlestring',
|
||||
|
@@ -138,10 +138,7 @@ void mch_exit(int r) FUNC_ATTR_NORETURN
|
||||
{
|
||||
exiting = true;
|
||||
|
||||
if ((p_title
|
||||
|| (did_enable_title
|
||||
&& (p_titlestring == NULL || STRLEN(p_titlestring) == 0)))
|
||||
&& p_titleold != NULL) {
|
||||
if (p_title && *p_titleold != NUL) {
|
||||
ui_call_set_title(cstr_as_string((char *)p_titleold));
|
||||
}
|
||||
ui_builtin_stop();
|
||||
|
Reference in New Issue
Block a user