Author: jpobst
Date: 2007-12-20 12:26:24 -0500 (Thu, 20 Dec 2007)
New Revision: 91720

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Line.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
Log:
Revert r91713.  It breaks 
MonoTests.System.Windows.Forms.RichTextBoxTest.SelectionFontTest : A1.

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-12-20 17:10:59 UTC (rev 91719)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-12-20 17:26:24 UTC (rev 91720)
@@ -1,9 +1,3 @@
-2007-12-20  Jonathan Pobst  <[EMAIL PROTECTED]>
-
-       * Line.cs, TextControl.cs: Apply patch from Luke Page that finds the
-       end of a tag better, fixing a IndexOutOfRangeException.
-       [Fixes bug #349926]
-
 2007-12-19  Carlos Alberto Cortez <[EMAIL PROTECTED]>
 
        * ListBox.cs: Both FindString and FindStringExact methods must do an

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Line.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Line.cs  
2007-12-20 17:10:59 UTC (rev 91719)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Line.cs  
2007-12-20 17:26:24 UTC (rev 91720)
@@ -348,9 +348,7 @@
                                pos = text.Length - 1;
 
                        while (tag != null) {
-                               // if its less than or equal on the second part 
then 
-                               // we find the tag which the caret is at the 
end of
-                               if (((tag.Start - 1) <= pos) && (pos <= 
(tag.Start + tag.Length - 1)))
+                               if (((tag.Start - 1) <= pos) && (pos < 
(tag.Start + tag.Length - 1)))
                                        return LineTag.GetFinalTag (tag);
 
                                tag = tag.Next;

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs   
2007-12-20 17:10:59 UTC (rev 91719)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs   
2007-12-20 17:26:24 UTC (rev 91720)
@@ -1013,7 +1013,7 @@
                                current_line = GetLine (start_line.LineNo + 
current_cumulative - 1);
 
                                // find the tag we start on
-                               LineTag current_tag = current_line.FindTag 
(index_found - (int)cumulative_length_list [current_cumulative - 1] + 1);
+                               LineTag current_tag = current_line.FindTag 
(index_found - (int)cumulative_length_list [current_cumulative - 1]);
 
                                if (current_tag.Start != (index_found - 
(int)cumulative_length_list [current_cumulative - 1]) + 1) {
                                        if (current_tag == CaretTag)

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to