From 8269b100a1e6b514153fd90fcb401256e5406c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Luthi?= Date: Thu, 9 Nov 2023 11:48:42 +0100 Subject: [PATCH] Fix AnsiConsoleOutput safe height The safe height (introduced in 3e2eea730bf0f6fe4a5e336faa312b526d351079) would be 80 (the value of the safe width) instead of 24. Removing the explicit `defaultValue` parameter ensures that the correct constants are used, i.e. Constants.DefaultTerminalWidth and Constants.DefaultTerminalHeight. --- src/Spectre.Console/AnsiConsoleOutput.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Spectre.Console/AnsiConsoleOutput.cs b/src/Spectre.Console/AnsiConsoleOutput.cs index 4e278f996..a26cf7301 100644 --- a/src/Spectre.Console/AnsiConsoleOutput.cs +++ b/src/Spectre.Console/AnsiConsoleOutput.cs @@ -28,10 +28,10 @@ public bool IsTerminal } /// - public int Width => ConsoleHelper.GetSafeWidth(Constants.DefaultTerminalWidth); + public int Width => ConsoleHelper.GetSafeWidth(); /// - public int Height => ConsoleHelper.GetSafeHeight(Constants.DefaultTerminalWidth); + public int Height => ConsoleHelper.GetSafeHeight(); /// /// Initializes a new instance of the class.