From 9b5c1fcdeae75f82a2083fafbbf75ab220f6ac1e Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 14 Feb 2019 14:08:04 +0100 Subject: 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) --- src/os_mswin.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/os_mswin.c') diff --git a/src/os_mswin.c b/src/os_mswin.c index 8dafaa35b1..9da72b0a4d 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 -- cgit v1.2.3