Author: jackson
Date: 2007-04-03 17:52:34 -0400 (Tue, 03 Apr 2007)
New Revision: 75363
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
Log:
* TextControl.cs: Don't attempt to copy text for lines with no
text in them (technically this shouldn't happen, but we aren't
always inserting line endings when we should be).
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-04-03 21:13:14 UTC (rev 75362)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-04-03 21:52:34 UTC (rev 75363)
@@ -1,5 +1,11 @@
2007-04-03 Jackson Harper <[EMAIL PROTECTED]>
+ * TextControl.cs: Don't attempt to copy text for lines with no
+ text in them (technically this shouldn't happen, but we aren't
+ always inserting line endings when we should be).
+
+2007-04-03 Jackson Harper <[EMAIL PROTECTED]>
+
* TextBoxBase.cs: Calculate the scrollbars before calculating the
document, because this sets some of the document size properties
that are needed.
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
2007-04-03 21:13:14 UTC (rev 75362)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
2007-04-03 21:52:34 UTC (rev 75363)
@@ -5248,7 +5248,10 @@
continue;
// Text for the tag
- line.text = new StringBuilder
(current.text.ToString (start, end - start));
+ if (current.text.Length > start)
+ line.text = new StringBuilder
(current.text.ToString (start, end - start));
+ else
+ line.text = new StringBuilder ();
// Copy tags from start to start+length onto
new line
current_tag = current.FindTag (start);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches