2008-10-03 Ivan N. Zlatev <contact@i-nz.net>
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / Line.cs
index 8a5c293ab9d4435584e782dfdb806b950159186e..a94ef12fbb818503e036843a5769cface8c5b8d5 100644 (file)
@@ -58,7 +58,7 @@ namespace System.Windows.Forms
                internal Line                   left;                   // Line with smaller line number\r
                internal Line                   right;                  // Line with higher line number\r
                internal LineColor              color;                  // We're doing a black/red tree. this is the node color\r
-               internal int                    DEFAULT_TEXT_LEN;       // \r
+               static int                      DEFAULT_TEXT_LEN = 0;   // \r
                internal bool                   recalc;                 // Line changed\r
                #endregion      // Local Variables\r
 \r
@@ -331,7 +331,7 @@ namespace System.Windows.Forms
                                break;\r
                        }\r
 \r
-                       TextBoxTextRenderer.DrawText (dc, end_str, last.Font, last.Color, X + widths [TextLengthWithoutEnding ()] - document.viewport_x, y, true);\r
+                       TextBoxTextRenderer.DrawText (dc, end_str, last.Font, last.Color, X + widths [TextLengthWithoutEnding ()] - document.viewport_x + document.OffsetX, y, true);\r
                }\r
 \r
                /// <summary> Find the tag on a line based on the character position, pos is 0-based</summary>\r