Author: pbartok
Date: 2005-06-29 20:23:55 -0400 (Wed, 29 Jun 2005)
New Revision: 46750

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

        * TextBoxBase.cs: Re-align caret after deleting a character
        * TextControl.cs:
          - DeleteChars(): Ensure that tag covers the provided position
          - StreamLine(): Drop reference for dropped tag



Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2005-06-30 00:05:19 UTC (rev 46749)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2005-06-30 00:23:55 UTC (rev 46750)
@@ -1,3 +1,10 @@
+2005-06-29  Peter Bartok  <[EMAIL PROTECTED]>
+
+       * TextBoxBase.cs: Re-align caret after deleting a character
+       * TextControl.cs:
+         - DeleteChars(): Ensure that tag covers the provided position
+         - StreamLine(): Drop reference for dropped tag
+
 2005-06-29  Peter Bartok  <[EMAIL PROTECTED]> 
 
        * TextControl.cs: 

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs   
2005-06-30 00:05:19 UTC (rev 46749)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextBoxBase.cs   
2005-06-30 00:23:55 UTC (rev 46750)
@@ -579,6 +579,7 @@
                        } else {
                                document.MoveCaret(CaretDirection.CtrlEnd);
                                document.InsertStringAtCaret(text, true);
+Console.WriteLine("TextBox.cs(582) Invalidate called in AppendText");
                                Invalidate();
                        }
                        OnTextChanged(EventArgs.Empty);
@@ -905,6 +906,7 @@
                                                
document.DeleteChar(document.CaretTag, document.CaretPosition, true);
                                                OnTextChanged(EventArgs.Empty);
                                        }
+                                       document.AlignCaret();
                                        document.UpdateCaret();
                                        CaretMoved(this, null);
                                        return true;
@@ -1055,7 +1057,7 @@
                        // Fill background
                        
pevent.Graphics.FillRectangle(ThemeEngine.Current.ResPool.GetSolidBrush(BackColor),
 pevent.ClipRectangle);
                        
pevent.Graphics.TextRenderingHint=TextRenderingHint.AntiAlias;
-
+Console.WriteLine("Redrawing {0}", pevent.ClipRectangle);
                        // Draw the viewable document
                        document.Draw(pevent.Graphics, pevent.ClipRectangle);
 
@@ -1171,6 +1173,7 @@
                protected void CalculateDocument() {
                        document.RecalculateDocument(CreateGraphics());
                        CalculateScrollBars();
+Console.WriteLine("TextBox.cs(1175) Invalidate called in CalculateDocument");
                        Invalidate();   // FIXME - do we need this?
                }
 

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs   
2005-06-30 00:05:19 UTC (rev 46749)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs   
2005-06-30 00:23:55 UTC (rev 46750)
@@ -248,6 +248,7 @@
                        // tags, but only if there are other tags after us
                        while ((current.length == 0) && (next != null)) {
                                tags = next;
+                               tags.previous = null;
                                current = next;
                                next = current.next;
                        }
@@ -1688,8 +1689,18 @@
                                return;
                        }
 
+
                        if (forward) {
                                line.text.Remove(pos, 1);
+
+                               while ((tag != null) && (tag.start + tag.length 
- 1) <= pos) {
+                                       tag = tag.next;
+                               }
+
+                               if (tag == null) {
+                                       return;
+                               }
+
                                tag.length--;
 
                                if (tag.length == 0) {

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

Reply via email to