From: handa Date: Mon, 15 Jun 2009 12:03:56 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d1ae89066a7547f370cde297ed52c83a697ccd5c;p=m17n%2Fm17n-lib-cs.git *** empty log message *** --- diff --git a/MText.cs b/MText.cs index 52d1943..986bad0 100644 --- a/MText.cs +++ b/MText.cs @@ -956,6 +956,7 @@ namespace M17N.Core tail = copy.find_tail (copy.Length); tail.Stack.Clear (); } + M17n.DebugPrint ("Copied: {0}\n", copy); return copy; } @@ -1161,7 +1162,8 @@ namespace M17N.Core if (interval != null) interval = interval.Copy (mtext, start, end, - front_grafted || prev == null, + (front_grafted + || (prev == null && start == 0)), rear_grafted); else interval = new MInterval (Key, mtext, end - start, null); @@ -1264,7 +1266,8 @@ namespace M17N.Core if (interval != null) interval = interval.Copy (mtext, start, end, front_grafted, - rear_grafted || next == null); + (rear_grafted + || (next == null && end < interval.mtext.Length))); else interval = new MInterval (Key, mtext, end - start, null); @@ -1366,16 +1369,18 @@ namespace M17N.Core end = To; rear_checked = true; } + if (start == From + && ! front_checked + && start > 0 + && isRearSensitive) + Prev.Stack.Clear (); + if (end == To + && ! rear_checked + && Next != null + && isFrontSensitive) + Next.Stack.Clear (); if (start == From && end == To) { - if (! front_checked - && start > 0 - && isRearSensitive) - Prev.Stack.Clear (); - if (! rear_checked - && end < mtext.Length - && isFrontSensitive) - Next.Stack.Clear (); if (Right == null) { vacate_node (Left);