mirror of
https://github.com/vim/vim.git
synced 2025-10-05 05:34:07 -04:00
patch 8.0.0094
Problem: When vimrun.exe is not found the error message is not properly encoded. Solution: Use utf-16 and MessageBoxW(). (Ken Takata)
This commit is contained in:
@@ -4705,12 +4705,24 @@ mch_call_shell(
|
|||||||
#if defined(FEAT_GUI_W32)
|
#if defined(FEAT_GUI_W32)
|
||||||
if (need_vimrun_warning)
|
if (need_vimrun_warning)
|
||||||
{
|
{
|
||||||
MessageBox(NULL,
|
char *msg = _("VIMRUN.EXE not found in your $PATH.\n"
|
||||||
_("VIMRUN.EXE not found in your $PATH.\n"
|
"External commands will not pause after completion.\n"
|
||||||
"External commands will not pause after completion.\n"
|
"See :help win32-vimrun for more information.");
|
||||||
"See :help win32-vimrun for more information."),
|
char *title = _("Vim Warning");
|
||||||
_("Vim Warning"),
|
# ifdef FEAT_MBYTE
|
||||||
MB_ICONWARNING);
|
if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
|
||||||
|
{
|
||||||
|
WCHAR *wmsg = enc_to_utf16((char_u *)msg, NULL);
|
||||||
|
WCHAR *wtitle = enc_to_utf16((char_u *)title, NULL);
|
||||||
|
|
||||||
|
if (wmsg != NULL && wtitle != NULL)
|
||||||
|
MessageBoxW(NULL, wmsg, wtitle, MB_ICONWARNING);
|
||||||
|
vim_free(wmsg);
|
||||||
|
vim_free(wtitle);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
# endif
|
||||||
|
MessageBox(NULL, msg, title, MB_ICONWARNING);
|
||||||
need_vimrun_warning = FALSE;
|
need_vimrun_warning = FALSE;
|
||||||
}
|
}
|
||||||
if (!s_dont_use_vimrun && p_stmp)
|
if (!s_dont_use_vimrun && p_stmp)
|
||||||
|
@@ -764,6 +764,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
94,
|
||||||
/**/
|
/**/
|
||||||
93,
|
93,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user