Author: jackson
Date: 2006-11-07 11:28:34 -0500 (Tue, 07 Nov 2006)
New Revision: 67465

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

        * TextControl.cs: There is an initial "fake" line in the
        * document,
        this is now a soft break line, so that an extra line feed
doesn't
        get added to the end of documents.
`


Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-11-07 16:21:42 UTC (rev 67464)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2006-11-07 16:28:34 UTC (rev 67465)
@@ -2,6 +2,9 @@
 
        * TextBoxBase.cs: When converting to Text don't put line breaks in
        for soft line breaks.
+       * TextControl.cs: There is an initial "fake" line in the document,
+       this is now a soft break line, so that an extra line feed doesn't
+       get added to the end of documents.
 
 2006-11-07  Chris Toshok  <[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   
2006-11-07 16:21:42 UTC (rev 67464)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs   
2006-11-07 16:28:34 UTC (rev 67465)
@@ -795,8 +795,10 @@
                        // We always have a blank line
                        owner.HandleCreated += new 
EventHandler(owner_HandleCreated);
                        owner.VisibleChanged += new 
EventHandler(owner_VisibleChanged);
+
                        Add(1, "", owner.Font, 
ThemeEngine.Current.ResPool.GetSolidBrush(owner.ForeColor));
-                       lines=1;
+                       Line l = GetLine (1);
+                       l.soft_break = true;
 
                        undo = new UndoClass(this);
 
@@ -1385,6 +1387,9 @@
 
                        // We always have a blank line
                        Add(1, "", owner.Font, 
ThemeEngine.Current.ResPool.GetSolidBrush(owner.ForeColor));
+                       Line l = GetLine (1);
+                       l.soft_break = true;
+                       
                        
this.RecalculateDocument(owner.CreateGraphicsInternal());
                        PositionCaret(0, 0);
 

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

Reply via email to