summaryrefslogtreecommitdiff
path: root/src/os_mswin.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-02-14 14:08:04 +0100
committerBram Moolenaar <Bram@vim.org>2019-02-14 14:08:04 +0100
commit9b5c1fcdeae75f82a2083fafbbf75ab220f6ac1e (patch)
treed051df8c1f277a55dd178ff945496fd7181eb475 /src/os_mswin.c
parent445e71c5ee06015064cf0642cac8190cfe8fbc59 (diff)
downloadvim-git-9b5c1fcdeae75f82a2083fafbbf75ab220f6ac1e.tar.gz
patch 8.1.0918: MS-Windows: startup messages are not convertedv8.1.0918
Problem: MS-Windows: startup messages are not converted. Solution: Convert messages when the current codepage differs from 'encoding'. (Yasuhiro Matsumoto, closes #3914)
Diffstat (limited to 'src/os_mswin.c')
-rw-r--r--src/os_mswin.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/os_mswin.c b/src/os_mswin.c
index 8dafaa35b..9da72b0a4 100644
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -675,6 +675,7 @@ mch_suspend(void)
# undef display_errors
#endif
+#ifdef FEAT_GUI
/*
* Display the saved error message(s).
*/
@@ -690,13 +691,9 @@ display_errors(void)
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 @@ display_errors(void)
ga_clear(&error_ga);
}
}
+#else
+ void
+display_errors(void)
+{
+ FlushFileBuffers(GetStdHandle(STD_ERROR_HANDLE));
+}
+#endif
#endif