Merge pull request #1649 from willmcgugan/win-fix

legacy windows fix
This commit is contained in:
Will McGugan 2021-11-06 12:57:23 +00:00 committed by GitHub
commit 9b42555e26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -941,7 +941,7 @@ class Console:
"""
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)
@ -963,7 +963,7 @@ class Console:
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,
)