2005-12-21 Peter Dennis Bartok <pbartok@novell.com>
authorPeter Dennis Bartok <pbartok@mono-cvs.ximian.com>
Wed, 21 Dec 2005 09:32:29 +0000 (09:32 -0000)
committerPeter Dennis Bartok <pbartok@mono-cvs.ximian.com>
Wed, 21 Dec 2005 09:32:29 +0000 (09:32 -0000)
* TextControl.cs (RecalculateLine): Only wrap if the wrap point is
  neither the beginning nor the end of the line (Fixes bug #76479)

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

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/TextControl.cs

index f15d01feb63333a7f1103f4ed1b0504566990e4a..be17b64d1249b32ae4f09ac9768aa4336905358f 100644 (file)
@@ -1,3 +1,8 @@
+2005-12-21  Peter Dennis Bartok  <pbartok@novell.com>
+
+       * TextControl.cs (RecalculateLine): Only wrap if the wrap point is
+         neither the beginning nor the end of the line (Fixes bug #76479)
+
 2005-12-21  Peter Dennis Bartok  <pbartok@novell.com> 
 
        * Control.cs:
index 7df4823a5528856e5cc7c59645a8b77ef5648d77..afce1d8fd3e25c856800a0a22a98684a6d256b39 100644 (file)
@@ -452,7 +452,7 @@ namespace System.Windows.Forms {
                                }
 
                                if (doc.wrap) {
-                                       if ((widths[pos] + w) + 27 > (doc.viewport_width - this.right_indent)) {
+                                       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);