浏览代码

Fixes #1930. Trailing whitespace makes MessageBox.Query buttons disappear. (#1931)

Co-authored-by: Tig Kindel <[email protected]>
BDisp 3 年之前
父节点
当前提交
a8ec4fd074
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Terminal.Gui/Windows/MessageBox.cs

+ 1 - 1
Terminal.Gui/Windows/MessageBox.cs

@@ -242,7 +242,7 @@ namespace Terminal.Gui {
 			const int defaultWidth = 50;
 			const int defaultWidth = 50;
 			int textWidth = TextFormatter.MaxWidth (message, width == 0 ? defaultWidth : width);
 			int textWidth = TextFormatter.MaxWidth (message, width == 0 ? defaultWidth : width);
 			int textHeight = TextFormatter.MaxLines (message, textWidth); // message.Count (ustring.Make ('\n')) + 1;
 			int textHeight = TextFormatter.MaxLines (message, textWidth); // message.Count (ustring.Make ('\n')) + 1;
-			int msgboxHeight = Math.Max (1, textHeight) + 3; // textHeight + (top + top padding + buttons + bottom)
+			int msgboxHeight = Math.Max (1, textHeight) + 4; // textHeight + (top + top padding + buttons + bottom)
 
 
 			// Create button array for Dialog
 			// Create button array for Dialog
 			int count = 0;
 			int count = 0;