Переглянути джерело

2006-02-26 Peter Dennis Bartok <[email protected]>

	* TextControl.cs(Insert): Combine the last lines unless the insertion
	  string ends with \n\n, otherwise we leave one line too many (Fixes
	  something I noticed with the testapp for #77526; the bug itself was
	  already fixed in the previous checkin)


svn path=/trunk/mcs/; revision=57323
Peter Dennis Bartok 20 роки тому
батько
коміт
f3c8041493

+ 7 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog

@@ -1,3 +1,10 @@
+2006-02-26  Peter Dennis Bartok  <[email protected]> 
+
+	* TextControl.cs(Insert): Combine the last lines unless the insertion
+	  string ends with \n\n, otherwise we leave one line too many (Fixes
+	  something I noticed with the testapp for #77526; the bug itself was
+	  already fixed in the previous checkin)
+
 2006-02-26  Peter Dennis Bartok  <[email protected]>
 
 	* RichTextBox.cs:

+ 1 - 1
mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs

@@ -1889,7 +1889,7 @@ namespace System.Windows.Forms {
 				for (i = 1; i < insert_lines; i++) {
 					Add(base_line + i, ins[i], line.alignment, tag.font, tag.color);
 				}
-				if (!s.EndsWith("\n")) {
+				if (!s.EndsWith("\n\n")) {
 					this.Combine(base_line + insert_lines - 1, base_line + insert_lines);
 				}
 			}