*** empty log message ***
authorhanda <handa>
Tue, 30 Jun 2009 11:48:25 +0000 (11:48 +0000)
committerhanda <handa>
Tue, 30 Jun 2009 11:48:25 +0000 (11:48 +0000)
MText.cs

index 03aa654..39f9359 100644 (file)
--- a/MText.cs
+++ b/MText.cs
@@ -518,10 +518,17 @@ namespace M17N.Core
              intervals.Push (prop.key, root);
            }
          else
-           root = (MInterval) p.Val;
-
-         if (root.isSensitive)
-           root.PopSensitive (from, to);
+           {
+             root = (MInterval) p.Val;
+             if (root.isSensitive)
+               {
+                 root.PopSensitive (from, to);
+                 root.MergeAfterChange (from, to);
+                 root = (MInterval) p.Val;
+                 if (M17n.debug)
+                   DumpPropNested ();
+               }
+           }
          root.Push (from, to, prop);
          root.MergeAfterChange (from, to);
          root.Balance ();
@@ -1619,22 +1626,6 @@ namespace M17N.Core
        update_from_to ();
        MInterval head = find_head (start);
        MInterval tail = find_tail (end);
-       while (! head.Stack.IsEmpty && head.From > 0)
-         {
-           MInterval prev = head.Prev;
-
-           if (prev.Stack.IsEmpty || head.Stack.Val != prev.Stack.Val)
-             break;
-           head = head.Prev;
-         }
-       while (! tail.Stack.IsEmpty && tail.To < mtext.Length)
-         {
-           MInterval next = tail.Next;
-
-           if (next.Stack.IsEmpty || tail.Stack.Val != next.Stack.Val)
-             break;
-           tail = tail.Next;
-         }
        Pop (head.From, tail.To);
       }