comparison src/os_mswin.c @ 15822:9745c25da3bc v8.1.0918

patch 8.1.0918: MS-Windows: startup messages are not converted commit https://github.com/vim/vim/commit/9b5c1fcdeae75f82a2083fafbbf75ab220f6ac1e Author: Bram Moolenaar <Bram@vim.org> Date: Thu Feb 14 14:08:04 2019 +0100 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)
author Bram Moolenaar <Bram@vim.org>
date Thu, 14 Feb 2019 14:15:15 +0100
parents 028c9fdb8469
children 7fad90423bd2
comparison
equal deleted inserted replaced
15821:1c1897fe1cc2 15822:9745c25da3bc
673 673
674 #ifdef display_errors 674 #ifdef display_errors
675 # undef display_errors 675 # undef display_errors
676 #endif 676 #endif
677 677
678 #ifdef FEAT_GUI
678 /* 679 /*
679 * Display the saved error message(s). 680 * Display the saved error message(s).
680 */ 681 */
681 void 682 void
682 display_errors(void) 683 display_errors(void)
688 /* avoid putting up a message box with blanks only */ 689 /* avoid putting up a message box with blanks only */
689 for (p = (char *)error_ga.ga_data; *p; ++p) 690 for (p = (char *)error_ga.ga_data; *p; ++p)
690 if (!isspace(*p)) 691 if (!isspace(*p))
691 { 692 {
692 (void)gui_mch_dialog( 693 (void)gui_mch_dialog(
693 #ifdef FEAT_GUI
694 gui.starting ? VIM_INFO : 694 gui.starting ? VIM_INFO :
695 #endif
696 VIM_ERROR, 695 VIM_ERROR,
697 #ifdef FEAT_GUI
698 gui.starting ? (char_u *)_("Message") : 696 gui.starting ? (char_u *)_("Message") :
699 #endif
700 (char_u *)_("Error"), 697 (char_u *)_("Error"),
701 (char_u *)p, (char_u *)_("&Ok"), 698 (char_u *)p, (char_u *)_("&Ok"),
702 1, NULL, FALSE); 699 1, NULL, FALSE);
703 break; 700 break;
704 } 701 }
705 ga_clear(&error_ga); 702 ga_clear(&error_ga);
706 } 703 }
707 } 704 }
705 #else
706 void
707 display_errors(void)
708 {
709 FlushFileBuffers(GetStdHandle(STD_ERROR_HANDLE));
710 }
711 #endif
708 #endif 712 #endif
709 713
710 714
711 /* 715 /*
712 * Return TRUE if "p" contain a wildcard that can be expanded by 716 * Return TRUE if "p" contain a wildcard that can be expanded by