Author: jackson
Date: 2006-11-13 11:01:20 -0500 (Mon, 13 Nov 2006)
New Revision: 67763

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

                - We don't need to position the caret on mouse up, since
                  the mouse
        move handler should be doing this
        - When double clicking a blank line, the caret is advanced to
          the
        next line.



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-11-13 15:49:36 UTC (rev 67762)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-11-13 16:01:20 UTC (rev 67763)
@@ -2,6 +2,10 @@
 
        * TextBoxBase.cs: Don't select the word if we are on a line with
        no text.
+       - We don't need to position the caret on mouse up, since the mouse
+       move handler should be doing this
+       - When double clicking a blank line, the caret is advanced to the
+       next line.
 
 2006-11-13  Gert Driesen  <[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-11-13 15:49:36 UTC (rev 67762)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs   
2006-11-13 16:01:20 UTC (rev 67763)
@@ -1505,7 +1505,6 @@
 
                private void TextBoxBase_MouseUp(object sender, MouseEventArgs 
e) {
                        if (e.Button == MouseButtons.Left) {
-                               document.PositionCaret(e.X + 
document.ViewPortX, e.Y + document.ViewPortY);
                                if (click_mode == CaretSelection.Position) {
                                        document.SetSelectionToCaret(false);
                                        document.DisplayCaret();
@@ -1582,8 +1581,13 @@
                        int start = document.caret.pos;
                        int end = document.caret.pos;
 
-                       if (s.Length < 1)
+                       if (s.Length < 1) {
+                               if (document.caret.line.line_no >= 
document.Lines)
+                                       return;
+                               Line line = document.GetLine 
(document.caret.line.line_no + 1);
+                               document.PositionCaret (line, 0);
                                return;
+                       }
 
                        if (start > 0) {
                                start--;

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

Reply via email to