diff options
author | nate <nateozemon@gmail.com> | 2017-08-19 18:33:14 -0700 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-10-05 09:18:30 +0200 |
commit | 5f4d2edeeea4d05761811d652dee8067fdbbae2a (patch) | |
tree | de29c91dff64426a1b4bef6c6e4b9fa3c33e5803 /src/nvim/buffer.c | |
parent | b7fe15d8f9162888dd2ca944e61e1e12abe84815 (diff) | |
download | rneovim-5f4d2edeeea4d05761811d652dee8067fdbbae2a.tar.gz rneovim-5f4d2edeeea4d05761811d652dee8067fdbbae2a.tar.bz2 rneovim-5f4d2edeeea4d05761811d652dee8067fdbbae2a.zip |
'titleold': set UI title on exit #7191
closes #7129
ref #4063
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 724a8578ac..950010b13b 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -3069,9 +3069,16 @@ 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 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_flush(); + } } # if defined(EXITFREE) |