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

Submitted by:  None
Submitted on:  Fri 22 Oct 2004 11:50:52 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned 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>
Project 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

 

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

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 25 Oct 2004 01:17:13 PM UTCt3rmin4t0rStatusNone=>Fixed
  Open/ClosedOpen=>Closed
Fri 22 Oct 2004 11:54:06 PM UTCNoneAttached File-=>Added textbox-lines.diff, #1795

Back to the top


Powered by Savane 3.1-cleanup1