bugDotGNU Portable.NET - Bugs: bug #10772, TextBox.Lines incorrectly handles...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #10772: TextBox.Lines incorrectly handles empty lines

Submitter:  None
Submitted:  Fri 22 Oct 2004 11:50:52 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Mon 25 Oct 2004 01:17:13 PM UTC, comment #2: 

Fixed in CVS 25th Oct 2004. Please note that a couple more
problems with Lines[] has been fixed.

Gopal.V <t3rmin4t0r>
Group administrator
Fri 22 Oct 2004 11:54:06 PM UTC, comment #1: 

Frowny face, it ate my formatting.
I will try attaching.

Anonymous
Fri 22 Oct 2004 11:50:52 PM UTC, original submission:  

Currently, TextBox.Lines will incorrectly merge lines across empty lines in the text, and the "extra" array elements are nullrefs. 

i is incremented too far when a line is detected.
This tries to be clearer by putting all the incrementing in one location

--- TextBox.cs~:2004-10-14 14:49:40.000000000 -0700tem.Windows.Forms >vim Te
+++ TextBox.cs  2004-10-22 16:44:39.000000000 -0700
@@ -423,7 +423,7 @@roject/csharp/dotgnu/pnetlib/System.Windows.Forms >vim TextBo                            .cs                    int start = 0;
                        line = 0;
                        // Break into strings
-                       for (int i = 0; i < Text.Length; i++)
+                       for (int i = 0; i < Text.Length;)
                        {
                                if (Text[i] == '\r' && i < Text.Length - 1 && Text[i+1] == '\n') // Look for CRLF
                                {
@@ -431,6 +431,7 @@
                                        i+=2;
                                        start = i;
                                }
+                                else i++;
                        }
                       
                        return lines;

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #1922:  textbox-lines.diff added by None (490B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 3 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-10-25 t3rmin4t0r StatusNone Fixed
    Open/ClosedOpen Closed
2004-10-22 None Attached File- Added textbox-lines.diff, #1795

Back to the top

Powered by Savane 3.12