diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-10-05 21:49:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-05 21:49:06 +0200 |
commit | 01487d4385aeffae4b2365689c7d798f740f7100 (patch) | |
tree | 93fb82598ecf1d227137cd093c16cc14b537e76c /src | |
parent | b7fe15d8f9162888dd2ca944e61e1e12abe84815 (diff) | |
parent | 73b50de925c10aaf0db2ffed47ec8459b0730cd1 (diff) | |
download | rneovim-01487d4385aeffae4b2365689c7d798f740f7100.tar.gz rneovim-01487d4385aeffae4b2365689c7d798f740f7100.tar.bz2 rneovim-01487d4385aeffae4b2365689c7d798f740f7100.zip |
Merge #7358 from justinmk/titleold
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/buffer.c | 10 | ||||
-rw-r--r-- | src/nvim/main.c | 5 | ||||
-rw-r--r-- | src/nvim/options.lua | 2 |
3 files changed, 13 insertions, 4 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 724a8578ac..fbfb4e02ea 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -3069,9 +3069,13 @@ static bool ti_change(char_u *str, char_u **last) /// Set current window title void resettitle(void) { - ui_call_set_title(cstr_as_string((char *)lasttitle)); - ui_call_set_icon(cstr_as_string((char *)lasticon)); - ui_flush(); + if (p_icon) { + ui_call_set_icon(cstr_as_string((char *)lasticon)); + } + if (p_title || p_icon) { + ui_call_set_title(cstr_as_string((char *)lasttitle)); + ui_flush(); + } } # if defined(EXITFREE) diff --git a/src/nvim/main.c b/src/nvim/main.c index 024c56dd05..ea7a58bda3 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -649,6 +649,11 @@ void getout(int exitval) /* Position the cursor again, the autocommands may have moved it */ ui_cursor_goto((int)Rows - 1, 0); + // Apply 'titleold'. + if (p_title && *p_titleold != NUL) { + ui_call_set_title(cstr_as_string((char *)p_titleold)); + } + #if defined(USE_ICONV) && defined(DYNAMIC_ICONV) iconv_end(); #endif diff --git a/src/nvim/options.lua b/src/nvim/options.lua index 103227f6b5..84ccb2e28d 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -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', |