Author: jackson
Date: 2006-11-06 15:57:46 -0500 (Mon, 06 Nov 2006)
New Revision: 67417

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
Log:

        * TextControl.cs: These are 1 based.
        * TextBoxBase.cs: When setting the selected text, don't change
        * the
        selected text tags, this is done by ReplaceText, just position
the
        cursor at the end of the new text.



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-11-06 20:45:09 UTC (rev 67416)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-11-06 20:57:46 UTC (rev 67417)
@@ -1,3 +1,10 @@
+2006-11-06  Jackson Harper  <[EMAIL PROTECTED]>
+
+       * TextControl.cs: These are 1 based.
+       * TextBoxBase.cs: When setting the selected text, don't change the
+       selected text tags, this is done by ReplaceText, just position the
+       cursor at the end of the new text.
+
 2006-11-06  Alexander Olk  <[EMAIL PROTECTED]>
 
        * ListView.cs: Allow label edit only when, when LabelEdit is

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs   
2006-11-06 20:45:09 UTC (rev 67416)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs   
2006-11-06 20:57:46 UTC (rev 67417)
@@ -435,8 +435,7 @@
                        set {
                                if (!read_only) {
                                        
document.ReplaceSelection(CaseAdjust(value));
-                                       
document.SetSelectionStart(document.caret.line, document.caret.pos);
-                                       
document.SetSelectionEnd(document.caret.line, document.caret.pos);
+                                       document.PositionCaret 
(document.selection_end.line, document.selection_end.pos);
                                        ScrollToCaret();
                                        OnTextChanged(EventArgs.Empty);
                                }

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs   
2006-11-06 20:45:09 UTC (rev 67416)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs   
2006-11-06 20:57:46 UTC (rev 67417)
@@ -3362,7 +3362,7 @@
                        
                        Insert(selection_start.line, null, selection_start.pos, 
true, s);
 
-                       CharIndexToLineTag(selection_start_pos + s.Length, out 
selection_start.line,
+                       CharIndexToLineTag(selection_start_pos + s.Length + 1, 
out selection_start.line,
                                        out selection_start.tag, out 
selection_start.pos);
                        
                        selection_end.line = selection_start.line;

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

Reply via email to