mirror of
https://github.com/neovim/neovim.git
synced 2024-12-25 13:45:15 -07:00
parent
b7fe15d8f9
commit
5f4d2edeee
@ -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)
|
||||
|
@ -279,6 +279,7 @@ 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,6 +1953,7 @@ did_set_title (
|
||||
if (starting != NO_SCREEN) {
|
||||
maketitle();
|
||||
resettitle();
|
||||
did_enable_title = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user