patch 8.1.0918: MS-Windows: startup messages are not converted
Problem: MS-Windows: startup messages are not converted.
Solution: Convert messages when the current codepage differs from
'encoding'. (Yasuhiro Matsumoto, closes #3914)
diff --git a/src/os_mswin.c b/src/os_mswin.c
index 8dafaa3..9da72b0 100644
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -675,6 +675,7 @@
# undef display_errors
#endif
+#ifdef FEAT_GUI
/*
* Display the saved error message(s).
*/
@@ -690,13 +691,9 @@
if (!isspace(*p))
{
(void)gui_mch_dialog(
-#ifdef FEAT_GUI
gui.starting ? VIM_INFO :
-#endif
VIM_ERROR,
-#ifdef FEAT_GUI
gui.starting ? (char_u *)_("Message") :
-#endif
(char_u *)_("Error"),
(char_u *)p, (char_u *)_("&Ok"),
1, NULL, FALSE);
@@ -705,6 +702,13 @@
ga_clear(&error_ga);
}
}
+#else
+ void
+display_errors(void)
+{
+ FlushFileBuffers(GetStdHandle(STD_ERROR_HANDLE));
+}
+#endif
#endif