mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 06:18:16 +00:00
@@ -3069,9 +3069,16 @@ static bool ti_change(char_u *str, char_u **last)
|
|||||||
/// Set current window title
|
/// Set current window title
|
||||||
void resettitle(void)
|
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_title(cstr_as_string((char *)lasttitle));
|
||||||
ui_call_set_icon(cstr_as_string((char *)lasticon));
|
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();
|
ui_flush();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# if defined(EXITFREE)
|
# 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
|
EXTERN int did_wait_return INIT(= FALSE); /* wait_return() was used and
|
||||||
nothing written since then */
|
nothing written since then */
|
||||||
EXTERN int need_maketitle INIT(= TRUE); /* call maketitle() soon */
|
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 */
|
EXTERN int quit_more INIT(= FALSE); /* 'q' hit at "--more--" msg */
|
||||||
#if defined(UNIX) || defined(MACOS_X)
|
#if defined(UNIX) || defined(MACOS_X)
|
||||||
|
@@ -1953,6 +1953,7 @@ did_set_title (
|
|||||||
if (starting != NO_SCREEN) {
|
if (starting != NO_SCREEN) {
|
||||||
maketitle();
|
maketitle();
|
||||||
resettitle();
|
resettitle();
|
||||||
|
did_enable_title = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,6 +15,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "nvim/api/private/handle.h"
|
#include "nvim/api/private/handle.h"
|
||||||
|
#include "nvim/api/private/helpers.h"
|
||||||
#include "nvim/vim.h"
|
#include "nvim/vim.h"
|
||||||
#include "nvim/ascii.h"
|
#include "nvim/ascii.h"
|
||||||
#include "nvim/os_unix.h"
|
#include "nvim/os_unix.h"
|
||||||
@@ -137,6 +138,12 @@ void mch_exit(int r) FUNC_ATTR_NORETURN
|
|||||||
{
|
{
|
||||||
exiting = true;
|
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_builtin_stop();
|
||||||
ui_flush();
|
ui_flush();
|
||||||
ml_close_all(true); // remove all memfiles
|
ml_close_all(true); // remove all memfiles
|
||||||
|
Reference in New Issue
Block a user