Skip to content

Commit

Permalink
Fix AnsiConsoleOutput safe height
Browse files Browse the repository at this point in the history
The safe height (introduced in 3e2eea7) 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.
  • Loading branch information
0xced committed Nov 9, 2023
1 parent 63b940c commit 8269b10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Spectre.Console/AnsiConsoleOutput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ public bool IsTerminal
}

/// <inheritdoc/>
public int Width => ConsoleHelper.GetSafeWidth(Constants.DefaultTerminalWidth);
public int Width => ConsoleHelper.GetSafeWidth();

/// <inheritdoc/>
public int Height => ConsoleHelper.GetSafeHeight(Constants.DefaultTerminalWidth);
public int Height => ConsoleHelper.GetSafeHeight();

/// <summary>
/// Initializes a new instance of the <see cref="AnsiConsoleOutput"/> class.
Expand Down

0 comments on commit 8269b10

Please sign in to comment.