*** empty log message ***
authorhanda <handa>
Wed, 21 Jan 2009 08:15:21 +0000 (08:15 +0000)
committerhanda <handa>
Wed, 21 Jan 2009 08:15:21 +0000 (08:15 +0000)
MText.cs

index 9a4434a..7e574ce 100644 (file)
--- a/MText.cs
+++ b/MText.cs
@@ -208,7 +208,7 @@ namespace M17N.Core
       if (root_interval != null)
        {
          MInterval interval = (mt2.root_interval == null
-                               ? new MInterval (0, false, to - from, false)
+                               ? null
                                : mt2.root_interval.CopyTree (from, to));
          root_interval.Insert (pos, interval);
        }
@@ -544,17 +544,17 @@ namespace M17N.Core
          {
            // position:    0           1           2           3
            // index:   -1  0  1  2  3  4  5  6  7  8  9  10 11 12 13
-           // this      |<----------<----------->---->|
-           //           |<--------->|           |<--->|
+           // this      |-----------<-----a----->-----|
+           //           |-----b-----|           |--c--|
            // 
-           // interval  |<====>---------->|
-           //                 |<aaaa>---->|
-           //                       |<...>|
+           // interval  <--A-->----------->
+           //                 <--B-->----->
+           //                       <--C-->
            //                             
-           // new       |<----------<----->----->-->------------>->|
-           //           |<--------->|     |<---->-->------------>->|
-           //                                      |<----------->->|
-           //                                                   |<>|       
+           // new       |-----------<-a-A->-----------------------|
+           //           |-----b-----|     |-----------<--a-->-----|
+           //                             |-a-B->-----|     |--c--|
+           //                                   |-a-C-|
            int len = interval.total_end - interval.total_start;
            MInterval temp;
 
@@ -562,11 +562,8 @@ namespace M17N.Core
            for (temp = this; temp.parent != null;
                 temp = temp.parent)
              temp.parent.total_end += len;
-           if (End - pos < interval.End)
-             {
-               
-
-             }
+           temp = new MInterval ();
+           temp.stack = new Stack<MTextProperty> (stack);
 
            temp = divide_right (Start + 2);
            temp.left = interval;