Skip to content

Commit

Permalink
legacy windows fix
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Nov 6, 2021
1 parent a584035 commit 25decd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rich/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ def size(self) -> ConsoleDimensions:
"""

if self._width is not None and self._height is not None:
return ConsoleDimensions(self._width - self.legacy_windows, self._height)
return ConsoleDimensions(self._width, self._height)

if self.is_dumb_terminal:
return ConsoleDimensions(80, 25)
Expand All @@ -963,7 +963,7 @@ def size(self) -> ConsoleDimensions:
width = width or 80
height = height or 25
return ConsoleDimensions(
(width if self._width is None else self._width) - self.legacy_windows,
((width - self.legacy_windows) if self._width is None else self._width),
height if self._height is None else self._height,
)

Expand Down

0 comments on commit 25decd0

Please sign in to comment.