aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os_unix.c
diff options
context:
space:
mode:
authornate <nateozemon@gmail.com>2017-08-19 18:33:14 -0700
committerJustin M. Keyes <justinkz@gmail.com>2017-10-05 09:18:30 +0200
commit5f4d2edeeea4d05761811d652dee8067fdbbae2a (patch)
treede29c91dff64426a1b4bef6c6e4b9fa3c33e5803 /src/nvim/os_unix.c
parentb7fe15d8f9162888dd2ca944e61e1e12abe84815 (diff)
downloadrneovim-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/os_unix.c')
-rw-r--r--src/nvim/os_unix.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c
index 692bcc97f4..5855a874c4 100644
--- a/src/nvim/os_unix.c
+++ b/src/nvim/os_unix.c
@@ -15,6 +15,7 @@
#include <string.h>
#include "nvim/api/private/handle.h"
+#include "nvim/api/private/helpers.h"
#include "nvim/vim.h"
#include "nvim/ascii.h"
#include "nvim/os_unix.h"
@@ -137,6 +138,12 @@ 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) {
+ ui_call_set_title(cstr_as_string((char *)p_titleold));
+ }
ui_builtin_stop();
ui_flush();
ml_close_all(true); // remove all memfiles