Author: jackson
Date: 2006-09-26 14:06:30 -0400 (Tue, 26 Sep 2006)
New Revision: 65928
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: Use the Line to get the length of the line,
since soft line breaks can change the end line.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-09-26 17:18:51 UTC (rev 65927)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-09-26 18:06:30 UTC (rev 65928)
@@ -1,3 +1,8 @@
+2006-09-26 Jackson Harper <[EMAIL PROTECTED]>
+
+ * TextControl.cs: Use the Line to get the length of the line,
+ since soft line breaks can change the end line.
+
2006-09-26 Chris Toshok <[EMAIL PROTECTED]>
* Control.cs (ControlCollection.AddImplicit): don't add the
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
2006-09-26 17:18:51 UTC (rev 65927)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
2006-09-26 18:06:30 UTC (rev 65928)
@@ -2128,7 +2128,8 @@
if (update_caret) {
// Move caret to the end of the inserted text
if (insert_lines > 1) {
- PositionCaret(GetLine(line.line_no +
insert_lines - 1), ins[ins.Length - 1].Length);
+ Line l = GetLine (line.line_no +
insert_lines + 1);
+ PositionCaret(l, l.text.Length);
} else {
PositionCaret(line, pos +
ins[0].Length);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches