Author: jpobst
Date: 2007-10-18 16:55:18 -0400 (Thu, 18 Oct 2007)
New Revision: 87799

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
Log:
2007-10-17  Jonathan Pobst  <[EMAIL PROTECTED]>

        * TextControl.cs: Make sure we know our start point for updating the 
view
        in ReplaceSelection.  Fixes an issue where pasting multiline text 
wouldn't
        update the view.

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-10-18 20:49:00 UTC (rev 87798)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-10-18 20:55:18 UTC (rev 87799)
@@ -1,5 +1,11 @@
-2007-10-17  Jonathan Pobst  <[EMAIL PROTECTED]>
+2007-10-17  Jonathan Pobst  <[EMAIL PROTECTED]>
 
+       * TextControl.cs: Make sure we know our start point for updating the 
view
+       in ReplaceSelection.  Fixes an issue where pasting multiline text 
wouldn't
+       update the view.
+
+2007-10-17  Jonathan Pobst  <[EMAIL PROTECTED]>
+
        * ListView: Couple of corcompare fixes.
 
 2007-10-17  Geoff Norton  <[EMAIL PROTECTED]>

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs   
2007-10-18 20:49:00 UTC (rev 87798)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs   
2007-10-18 20:55:18 UTC (rev 87799)
@@ -2923,6 +2923,9 @@
                        undo.RecordInsertString (selection_start.line, 
selection_start.pos, s);
                        ResumeRecalc (false);
 
+                       Line begin_update_line = selection_start.line;
+                       int begin_update_pos = selection_start.pos;
+                       
                        if (!select_new) {
                                CharIndexToLineTag(selection_start_pos + 
s.Length, out selection_start.line,
                                                out selection_start.tag, out 
selection_start.pos);
@@ -2950,7 +2953,7 @@
                        }
 
                        PositionCaret (selection_start.line, 
selection_start.pos);
-                       UpdateView (selection_start.line, 
selection_pos_on_line);
+                       UpdateView (begin_update_line, 
selection_end.line.line_no - begin_update_line.line_no, begin_update_pos);
                }
 
                internal void CharIndexToLineTag(int index, out Line line_out, 
out LineTag tag_out, out int pos) {

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

Reply via email to