mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
@@ -584,6 +584,7 @@ int main(int argc, char **argv)
|
|||||||
if (use_builtin_ui) {
|
if (use_builtin_ui) {
|
||||||
os_icon_init();
|
os_icon_init();
|
||||||
}
|
}
|
||||||
|
os_title_save();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Adjust default register name for "unnamed" in 'clipboard'. Can only be
|
// Adjust default register name for "unnamed" in 'clipboard'. Can only be
|
||||||
@@ -775,6 +776,7 @@ void getout(int exitval)
|
|||||||
#ifdef MSWIN
|
#ifdef MSWIN
|
||||||
// Restore Windows console icon before exiting.
|
// Restore Windows console icon before exiting.
|
||||||
os_icon_set(NULL, NULL);
|
os_icon_set(NULL, NULL);
|
||||||
|
os_title_reset();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
os_exit(exitval);
|
os_exit(exitval);
|
||||||
|
@@ -10,6 +10,7 @@
|
|||||||
# include "os/os_win_console.c.generated.h"
|
# include "os/os_win_console.c.generated.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static char origTitle[256] = { 0 };
|
||||||
static HWND hWnd = NULL;
|
static HWND hWnd = NULL;
|
||||||
static HICON hOrigIconSmall = NULL;
|
static HICON hOrigIconSmall = NULL;
|
||||||
static HICON hOrigIcon = NULL;
|
static HICON hOrigIcon = NULL;
|
||||||
@@ -92,3 +93,15 @@ void os_icon_init(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Saves the original Windows console title.
|
||||||
|
void os_title_save(void)
|
||||||
|
{
|
||||||
|
GetConsoleTitle(origTitle, sizeof(origTitle));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Resets the original Windows console title.
|
||||||
|
void os_title_reset(void)
|
||||||
|
{
|
||||||
|
SetConsoleTitle(origTitle);
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user