summaryrefslogtreecommitdiff
path: root/src/os_mswin.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2004-10-07 21:02:47 +0000
committerBram Moolenaar <Bram@vim.org>2004-10-07 21:02:47 +0000
commit3fdfa4a9a52ab3d1a790262ee872a49853ad4626 (patch)
tree76f57a06a5f3b9e0abc15446b38722658fde7e1e /src/os_mswin.c
parente5f258eb4c4b87ea1d6f61c1a0a9deecbb5d9726 (diff)
downloadvim-git-3fdfa4a9a52ab3d1a790262ee872a49853ad4626.tar.gz
updated for version 7.0017v7.0017
Diffstat (limited to 'src/os_mswin.c')
-rw-r--r--src/os_mswin.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/os_mswin.c b/src/os_mswin.c
index 7b5da8a4c..7f2288ee5 100644
--- 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
}