Mercurial > vim
diff src/os_mswin.c @ 26:404aac550f35 v7.0017
updated for version 7.0017
author | vimboss |
---|---|
date | Thu, 07 Oct 2004 21:02:47 +0000 |
parents | 3f44e9abe4ec |
children | fdf55076c53f |
line wrap: on
line diff
--- a/src/os_mswin.c +++ b/src/os_mswin.c @@ -267,6 +267,10 @@ mch_early_init(void) AnsiUpperBuff(toupper_tab, 256); AnsiLowerBuff(tolower_tab, 256); #endif + +#if defined(FEAT_MBYTE) && !defined(FEAT_GUI) + (void)get_cmd_argsW(NULL); +#endif } @@ -298,7 +302,25 @@ mch_settitle( gui_mch_settitle(title, icon); # else if (title != NULL) + { +# ifdef FEAT_MBYTE + if (enc_codepage >= 0 && (int)GetACP() != enc_codepage) + { + /* Convert the title from 'encoding' to the active codepage. */ + WCHAR *wp = enc_to_ucs2(title, NULL); + int n; + + if (wp != NULL) + { + n = SetConsoleTitleW(wp); + vim_free(wp); + if (n != 0 || GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) + return; + } + } +# endif SetConsoleTitle(title); + } # endif }