summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-07-25 22:30:20 +0200
committerBram Moolenaar <Bram@vim.org>2010-07-25 22:30:20 +0200
commitf82bac371703d25bf94d3a91bc68413d3f734be7 (patch)
tree0fa848c2b5c02f01267d27ceb1cdcca23b361dfd /src
parentc3301874a66e2b4377fb2dc238e5d07426a25c1c (diff)
Fix: terminal title not properly restured when there are multi-byte
characters. (partly by James Vega)
Diffstat (limited to 'src')
-rw-r--r--src/os_unix.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index be065f8357..4fb3d1ad01 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -1821,15 +1821,19 @@ get_x11_thing(get_title, test_only)
retval = TRUE;
if (!test_only)
{
-#ifdef FEAT_XFONTSET
- if (text_prop.encoding == XA_STRING)
+#if defined(FEAT_XFONTSET) || defined(FEAT_MBYTE)
+ if (text_prop.encoding == XA_STRING
+# ifdef FEAT_MBYTE
+ && !has_mbyte
+# endif
+ )
{
#endif
if (get_title)
oldtitle = vim_strsave((char_u *)text_prop.value);
else
oldicon = vim_strsave((char_u *)text_prop.value);
-#ifdef FEAT_XFONTSET
+#if defined(FEAT_XFONTSET) || defined(FEAT_MBYTE)
}
else
{
@@ -2020,7 +2024,7 @@ mch_settitle(title, icon)
#endif
/*
- * Note: if "t_TS" is set, title is set with escape sequence rather
+ * Note: if "t_ts" is set, title is set with escape sequence rather
* than x11 calls, because the x11 calls don't always work
*/
if ((type || *T_TS != NUL) && title != NULL)