fix(Windows): restore console title at exit #21922

Fixes #21404
This commit is contained in:
Enan Ajmain
2023-01-23 15:45:18 +06:00
committed by GitHub
parent cb757f2663
commit b36b58d0d4
2 changed files with 15 additions and 0 deletions

View File

@@ -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);