Browse Source

Also carry over the current line break to the next
line.


svn path=/trunk/mcs/; revision=68066

Jackson Harper 19 years ago
parent
commit
eeb7ea89cf

+ 2 - 1
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog

@@ -1,7 +1,8 @@
 2006-11-17  Jackson Harper  <[email protected]>
 
 	* TextControl.cs: When soft splitting a line, mark it as a soft
-	split line.
+	split line. Also carry over the current line break to the next
+	line.
 
 2006-11-17  Chris Toshok  <[email protected]>
 

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

@@ -475,7 +475,7 @@ namespace System.Windows.Forms {
 					if ((wrap_pos > 0) && (wrap_pos != len) && (widths[pos] + w) + 27 > (doc.viewport_width - this.right_indent)) {
 						pos = wrap_pos;
 						tag.width = wrap_width;
-						doc.Split(this, tag, pos, true);
+						doc.Split(this, tag, pos, this.soft_break);
 						this.soft_break = true;
 						len = this.text.Length;
 						retval = true;
@@ -483,7 +483,7 @@ namespace System.Windows.Forms {
 					} else if ((widths[pos] + w) > (doc.viewport_width - this.right_indent)) {
 						// No suitable wrap position was found so break right in the middle of a word
 						tag.width = tag.width + w;
-						doc.Split(this, tag, pos, true);
+						doc.Split(this, tag, pos, this.soft_break);
 						this.soft_break = true;
 						len = this.text.Length;
 						retval = true;