소스 검색

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

BDisp 4 년 전
부모
커밋
c398a69be2
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;
 				}