Author: jackson
Date: 2007-03-28 12:01:24 -0500 (Wed, 28 Mar 2007)
New Revision: 75086

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

        - Make sure the line ending calcs get called.



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-03-28 16:30:20 UTC (rev 75085)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2007-03-28 17:01:24 UTC (rev 75086)
@@ -2,6 +2,7 @@
 
        * TextControl.cs: If a char delete removes a line ending, we need
        to update the ending style.
+       - Make sure the line ending calcs get called.
 
 2007-03-28  Rolf Bjarne Kvinge <[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-03-28 16:30:20 UTC (rev 75085)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs   
2007-03-28 17:01:24 UTC (rev 75086)
@@ -2446,7 +2446,7 @@
                        }
 
                        if (tag == null) {
-                               return;
+                               goto Cleanup;
                        }
 
                        // Check if we're crossing tag boundaries
@@ -2503,7 +2503,8 @@
                                line.Streamline(lines);
                        }
 
-                       if (pos > line.TextLengthWithoutEnding ())
+               Cleanup:
+                       if (pos >= line.TextLengthWithoutEnding ())
                                GetLineEnding (line.text.ToString (), 0, out 
line.ending);
                        UpdateView(line, pos);
                }
@@ -2531,7 +2532,7 @@
                                }
 
                                if (tag == null) {
-                                       return;
+                                       goto Cleanup;
                                }
 
                                //      tag.length--;
@@ -2575,7 +2576,8 @@
                                line.Streamline(lines);
                        }
 
-                       if (pos > line.TextLengthWithoutEnding ())
+               Cleanup:
+                       if (pos >= line.TextLengthWithoutEnding ())
                                GetLineEnding (line.text.ToString (), 0, out 
line.ending);
                        UpdateView(line, pos);
                }

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

Reply via email to