Author: jackson
Date: 2007-01-03 09:46:13 -0500 (Wed, 03 Jan 2007)
New Revision: 70423

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: Need to prevent wrap calculations when
        * replacing
        text (this was there before i removed it accidently).
        - Don't update the cursor during the positioning, just set it to
        selection_start at the end of the operaion.



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-01-03 14:45:14 UTC (rev 70422)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-01-03 14:46:13 UTC (rev 70423)
@@ -1,3 +1,10 @@
+2007-01-03  Jackson Harper  <[EMAIL PROTECTED]>
+
+       * TextControl.cs: Need to prevent wrap calculations when replacing
+       text (this was there before i removed it accidently).
+       - Don't update the cursor during the positioning, just set it to
+       selection_start at the end of the operaion.
+
 2007-01-03  Rolf Bjarne Kvinge  <[EMAIL PROTECTED]>
 
        * Control.cs:

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs   
2007-01-03 14:45:14 UTC (rev 70422)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs   
2007-01-03 14:46:13 UTC (rev 70423)
@@ -3266,6 +3266,8 @@
                        InvalidateSelectionArea ();
 
                        int selection_start_pos = LineTagToCharIndex 
(selection_start.line, selection_start.pos);
+                       NoRecalc = true;
+
                        // First, delete any selected text
                        if ((selection_start.pos != selection_end.pos) || 
(selection_start.line != selection_end.line)) {
                                if (!multiline || (selection_start.line == 
selection_end.line)) {
@@ -3305,9 +3307,12 @@
                                }
                        }
 
-                       Insert(selection_start.line, selection_start.pos, true, 
s);
+
+                       Insert(selection_start.line, selection_start.pos, 
false, s);
+                       NoRecalc = false;
+
                        undo.RecordInsertString (selection_start.line, 
selection_start.pos, s);
-                       
+
                        if (!select_new) {
                                CharIndexToLineTag(selection_start_pos + 
s.Length, out selection_start.line,
                                                out selection_start.tag, out 
selection_start.pos);
@@ -3334,6 +3339,8 @@
                                SetSelectionVisible (true);
                        }
 
+                       PositionCaret (selection_start.line, 
selection_start.pos);
+
                        undo.EndCompoundAction ();
                }
 

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

Reply via email to