File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -2808,6 +2808,26 @@ mch_get_host_name(
28082808{
28092809 DWORD cch = len ;
28102810
2811+ #ifdef FEAT_MBYTE
2812+ if (enc_codepage >= 0 && (int )GetACP () != enc_codepage )
2813+ {
2814+ WCHAR wszHostName [256 + 1 ];
2815+ DWORD wcch = sizeof (wszHostName ) / sizeof (WCHAR );
2816+
2817+ if (GetComputerNameW (wszHostName , & wcch ))
2818+ {
2819+ char_u * p = utf16_to_enc (wszHostName , NULL );
2820+
2821+ if (p != NULL )
2822+ {
2823+ vim_strncpy (s , p , len - 1 );
2824+ vim_free (p );
2825+ return ;
2826+ }
2827+ }
2828+ /* Retry with non-wide function (for Windows 98). */
2829+ }
2830+ #endif
28112831 if (!GetComputerName (s , & cch ))
28122832 vim_strncpy (s , "PC (Win32 Vim)" , len - 1 );
28132833}
Original file line number Diff line number Diff line change @@ -738,6 +738,8 @@ static char *(features[]) =
738738
739739static int included_patches [] =
740740{ /* Add new patch number below this line */
741+ /**/
742+ 124 ,
741743/**/
742744 123 ,
743745/**/
You can’t perform that action at this time.
0 commit comments