vte r2049 - in trunk: . src
- From: behdad svn gnome org
- To: svn-commits-list gnome org
- Subject: vte r2049 - in trunk: . src
- Date: Tue, 27 May 2008 18:56:34 +0000 (UTC)
Author: behdad
Date: Tue May 27 18:56:34 2008
New Revision: 2049
URL: http://svn.gnome.org/viewvc/vte?rev=2049&view=rev
Log:
2008-05-27 Behdad Esfahbod <behdad gnome org>
Bug 535022 â ambiguous width in utf8 locale
* src/iso2022.c (_vte_iso2022_ambiguous_width): Recognize
env var settings VTE_CJK_WIDTH=narrow and VTE_CJK_WIDTH=wide.
Any other value means "auto" based on locale, as it was doing
previously.
Modified:
trunk/ChangeLog
trunk/src/iso2022.c
Modified: trunk/src/iso2022.c
==============================================================================
--- trunk/src/iso2022.c (original)
+++ trunk/src/iso2022.c Tue May 27 18:56:34 2008
@@ -403,8 +403,15 @@
* Decide the ambiguous width according to the default region if
* current locale is UTF-8.
*/
- if (strcmp (codeset, "utf8") == 0 && g_getenv("VTE_CJK_WIDTH") != NULL)
- return _vte_iso2022_ambiguous_width_guess ();
+ if (strcmp (codeset, "utf8") == 0 && g_getenv("VTE_CJK_WIDTH") != NULL) {
+ const char *env = g_getenv ("VTE_CJK_WIDTH");
+ if (g_ascii_strcasecmp (env, "narrow"))
+ return 1;
+ if (g_ascii_strcasecmp (env, "wide"))
+ return 2;
+ else
+ _vte_iso2022_ambiguous_width_guess ();
+ }
/* Not in the list => not wide. */
return 1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]