Author: pbartok
Date: 2006-06-15 18:01:55 -0400 (Thu, 15 Jun 2006)
New Revision: 61778

Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
Log:
2006-06-15  Peter Dennis Bartok  <[EMAIL PROTECTED]> 

        * TextControl.cs (Undo): Handle non-existent cursor locations in the
          undo buffer, these can happen when text was deleted and the cursor
          was recorded first. Since we will also have a recorded cursor
          after the delete this is not an issue. (Fixes #78651)



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-06-15 21:58:26 UTC (rev 61777)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-06-15 22:01:55 UTC (rev 61778)
@@ -1,3 +1,10 @@
+2006-06-15  Peter Dennis Bartok  <[EMAIL PROTECTED]> 
+
+       * TextControl.cs (Undo): Handle non-existent cursor locations in the
+         undo buffer, these can happen when text was deleted and the cursor
+         was recorded first. Since we will also have a recorded cursor
+         after the delete this is not an issue. (Fixes #78651)
+
 2006-06-14  Peter Dennis Bartok  <[EMAIL PROTECTED]> 
 
        * AccessibleObject.cs: Remove dependence on Control.is_selected;

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs   
2006-06-15 21:58:26 UTC (rev 61777)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs   
2006-06-15 22:01:55 UTC (rev 61778)
@@ -4459,6 +4459,10 @@
 
                                case ActionType.CursorMove: {
                                        document.caret.line = 
document.GetLine(action.line_no);
+                                       if (document.caret.line == null) {
+                                               break;
+                                       }
+
                                        document.caret.tag = 
document.caret.line.FindTag(action.pos);
                                        document.caret.pos = action.pos;
                                        document.caret.height = 
document.caret.tag.height;

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

Reply via email to