Author: jackson
Date: 2006-12-20 12:01:24 -0500 (Wed, 20 Dec 2006)
New Revision: 69816
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
Log:
- When backspacing, move the caret before we do the actual char
delete, because when that delete crosses a wrap boundary the
positional information will change.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-12-20 16:47:16 UTC (rev 69815)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2006-12-20 17:01:24 UTC (rev 69816)
@@ -4,6 +4,9 @@
can't recalculate after changing each line, since that will cahnge
the line count.
- PreferredHeight is a little different than i thought.
+ - When backspacing, move the caret before we do the actual char
+ delete, because when that delete crosses a wrap boundary the
+ positional information will change.
2006-12-19 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
2006-12-20 16:47:16 UTC (rev 69815)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
2006-12-20 17:01:24 UTC (rev 69816)
@@ -1177,8 +1177,14 @@
}
} else {
if (!control || document.CaretPosition == 0) {
- document.DeleteChar(document.CaretTag,
document.CaretPosition, false);
-
document.MoveCaret(CaretDirection.CharBack);
+
+ // Move before we delete because the
delete will change positions around
+ // if we cross a wrap border
+ LineTag tag = document.CaretTag;
+ int pos = document.CaretPosition;
+ document.MoveCaret
(CaretDirection.CharBack);
+ document.DeleteChar (tag, pos, false);
+
} else {
int start_pos;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches