slang2


slang2のバグ退治

現象

目標

前ぶれ

080_wide_charsのパッチ

#

diff -ruN slang-2.0.4-old/src/slutf8.c slang-2.0.4/src/slutf8.c
--- slang-2.0.4-old/src/slutf8.c        2005-06-20 18:56:22.000000000 +0300
+++ slang-2.0.4/src/slutf8.c    2005-07-14 18:23:07.456402952 +0300
@@ -148,19 +148,15 @@
             continue;
          }
        
-       if (ignore_combining)
-         {
+             int wi;
             SLwchar_Type w = fast_utf8_decode (s, len);
-            if (0 != SLwchar_wcwidth (w))
-              n++;
+            wi = SLwchar_wcwidth (w);
+            n+=wi;
             s += len;
             continue;
-         }
-
-       n++;
-       s += len;
      }
-
+#if 0
+   /* XXX how this should work???? */
    if (ignore_combining)
      {
        while (s < smax)
@@ -176,7 +172,7 @@
             s += nconsumed;
          }
      }
-
+#endif
    if (dnum != NULL)
      *dnum = n;
    return s;


Last modified : 2007/12/15 20:25:38 JST