Browse Source

Fixes #1197. Prevents width negative value if added directly to the Application.Top (#1198)

BDisp 4 years ago
parent
commit
c398a69be2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Terminal.Gui/Views/TextView.cs

+ 1 - 1
Terminal.Gui/Views/TextView.cs

@@ -776,7 +776,7 @@ namespace Terminal.Gui {
 				ResetPosition ();
 				if (wordWrap) {
 					wrapManager = new WordWrapManager (model);
-					model = wrapManager.WrapModel (Frame.Width - 2, out _, out _, out _, out _);
+					model = wrapManager.WrapModel (Math.Max (Frame.Width - 2, 0), out _, out _, out _, out _);
 				} else if (!wordWrap && wrapManager != null) {
 					model = wrapManager.Model;
 				}