summaryrefslogtreecommitdiffstats
path: root/src/gui_w48.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-04-19 21:23:36 +0000
committerBram Moolenaar <Bram@vim.org>2006-04-19 21:23:36 +0000
commit8424a624ce1c38716deabd47f4da23f1e81614bd (patch)
tree908266a65b60968cb3b662765198239944b2a365 /src/gui_w48.c
parentc1e37901fc8486c9960d7290e521ba51e292e94b (diff)
updated for version 7.0e03v7.0e03
Diffstat (limited to 'src/gui_w48.c')
-rw-r--r--src/gui_w48.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/gui_w48.c b/src/gui_w48.c
index f417c72d89..13e032493b 100644
--- a/src/gui_w48.c
+++ b/src/gui_w48.c
@@ -2295,10 +2295,21 @@ gui_mch_update_tabline(void)
int nr = 0;
int curtabidx = 0;
RECT rc;
+#ifdef FEAT_MBYTE
+ WCHAR *wstr = NULL;
+#endif
if (s_tabhwnd == NULL)
return;
+#if defined(FEAT_MBYTE) && defined(CCM_SETUNICODEFORMAT)
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ /*
+ * Enable unicode support
+ */
+ SendMessage(s_tabhwnd, CCM_SETUNICODEFORMAT, (WPARAM)TRUE, (LPARAM)0);
+#endif
+
tie.mask = TCIF_TEXT;
tie.iImage = -1;
@@ -2317,7 +2328,29 @@ gui_mch_update_tabline(void)
get_tabline_label(tp);
tie.pszText = NameBuff;
- TabCtrl_SetItem(s_tabhwnd, nr, &tie);
+#ifdef FEAT_MBYTE
+ wstr = NULL;
+ if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ {
+ /* Need to go through Unicode. */
+ wstr = enc_to_ucs2(NameBuff, NULL);
+ if (wstr != NULL)
+ {
+ TCITEMW tiw;
+
+ tiw.mask = TCIF_TEXT;
+ tiw.iImage = -1;
+ tiw.pszText = wstr;
+ SendMessage(s_tabhwnd, TCM_INSERTITEMW, (WPARAM)nr,
+ (LPARAM)&tiw);
+ vim_free(wstr);
+ }
+ }
+ if (wstr == NULL)
+#endif
+ {
+ TabCtrl_SetItem(s_tabhwnd, nr, &tie);
+ }
}
/* Remove any old labels. */