*** empty log message ***
[m17n/m17n-lib-cs.git] / MText.cs
index a46a95d..fe03bfb 100644 (file)
--- a/MText.cs
+++ b/MText.cs
@@ -42,11 +42,11 @@ namespace M17N.Core
       /// Like Sensitive but also this property is deleted from a span
       /// of text if a text just before the span is modified,
       /// inserted, or deleted.
-      FrontSensitive = 0x0C,
+      FrontSensitive = 0x08,
       /// Like Sensitive but also this property is deleted from a span
       /// of text if a text just after the span is modified, inserted,
       /// or deleted.
-      RearSensitive =  0x14
+      RearSensitive =  0x10
     };
 
     internal MSymbol key;
@@ -1327,15 +1327,18 @@ namespace M17N.Core
       }
 
       /// Combine intervals between HEAD and TAIL (both inclusive) to
-      /// the common parent of HEAD and TAIL while assuming that the
-      /// intervals are mergeable.
+      /// the common parent of HEAD and TAIL.  Callers should assure
+      /// that the intervals are mergeable in advance.
       private static void combine (MInterval head, MInterval tail)
       {
        M17n.DebugPrint ("combining "); head.DumpOne (true, false);
        M17n.DebugPrint (" through "); tail.DumpOne (true, false);
 
+       head.update_from_to ();
+       tail.update_from_to ();
        int from = head.From;
        int to = tail.To;
+
        // The nearest common parent of HEAD and TAIL.
        MInterval root;
        for (root = head; root.To + root.RightLength < to;
@@ -1377,6 +1380,7 @@ namespace M17N.Core
              }
            root.update_from_to ();
          }
+       M17n.DebugPrint ("combining done\n");
       }
 
       public void MergeAfterChange (int start, int end)