- Still have to do the end tag if we have stepped all the ways
authorJackson Harper <jackson@novell.com>
Mon, 2 Apr 2007 19:13:19 +0000 (19:13 -0000)
committerJackson Harper <jackson@novell.com>
Mon, 2 Apr 2007 19:13:19 +0000 (19:13 -0000)
          to
        the end.

svn path=/trunk/mcs/; revision=75297

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs

index fbfb546e208aadb2b34769850df4d397b18ea345..3f5b3f34493a02cf8dbadee0adf0155f595324c4 100644 (file)
@@ -2,6 +2,8 @@
 
        * TextControl.cs: Make sure the attributes get set on the last
        tag.
+       - Still have to do the end tag if we have stepped all the ways to
+       the end.
 
 2007-04-02  Sebastien Pouliot  <sebastien@ximian.com>
 
index 8d4842a9ccaced13a7cf7f06eb4df369aee87eac..361fbff51e507ea86bc913ca956da218ddcc2268 100644 (file)
@@ -4719,14 +4719,15 @@ namespace System.Windows.Forms {
                                tag = tag.next;
                        }
 
-                       if (tag != null && tag.end != end) {
-                               /// Now do the last tag
-                               end_tag = FindTag (line, end);
+                       if (tag != null && tag.end == end)
+                               return retval;
 
-                               if (end_tag != null) {
-                                       end_tag.Break (end);
-                                       SetFormat (end_tag, font, color, back_color, specified);
-                               }
+                       /// Now do the last tag
+                       end_tag = FindTag (line, end);
+
+                       if (end_tag != null) {
+                               end_tag.Break (end);
+                               SetFormat (end_tag, font, color, back_color, specified);
                        }
 
                        return retval;