Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

legacy windows fix #1649

Merged
merged 1 commit into from
Nov 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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