Explorar o código

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

BDisp %!s(int64=4) %!d(string=hai) anos
pai
achega
c398a69be2
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;
 				}