mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
parent
cb757f2663
commit
b36b58d0d4
@ -584,6 +584,7 @@ int main(int argc, char **argv)
|
||||
if (use_builtin_ui) {
|
||||
os_icon_init();
|
||||
}
|
||||
os_title_save();
|
||||
#endif
|
||||
|
||||
// Adjust default register name for "unnamed" in 'clipboard'. Can only be
|
||||
@ -775,6 +776,7 @@ void getout(int exitval)
|
||||
#ifdef MSWIN
|
||||
// Restore Windows console icon before exiting.
|
||||
os_icon_set(NULL, NULL);
|
||||
os_title_reset();
|
||||
#endif
|
||||
|
||||
os_exit(exitval);
|
||||
|
@ -10,6 +10,7 @@
|
||||
# include "os/os_win_console.c.generated.h"
|
||||
#endif
|
||||
|
||||
static char origTitle[256] = { 0 };
|
||||
static HWND hWnd = NULL;
|
||||
static HICON hOrigIconSmall = 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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user