Skip to content

Commit

Permalink
Better detection of legacy Windows terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
AcidWeb committed Dec 19, 2021
1 parent 578c38e commit 737f5ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CurseBreaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from rich.rule import Rule
from rich.table import Table
from rich.panel import Panel
from rich.console import Console
from rich.console import Console, detect_legacy_windows
from rich.control import Control
from rich.progress import Progress, BarColumn
from rich.traceback import Traceback, install
Expand Down Expand Up @@ -333,7 +333,7 @@ def setup_console(self):
window = windll.kernel32.GetConsoleWindow()
if window:
windll.user32.ShowWindow(window, 0)
elif 'WINDIR' in os.environ and 'WT_SESSION' not in os.environ and 'ALACRITTY_LOG' not in os.environ:
elif detect_legacy_windows():
set_terminal_size(100, 50)
windll.kernel32.SetConsoleScreenBufferSize(windll.kernel32.GetStdHandle(-11), wintypes._COORD(100, 200))
self.console = Console(width=97)
Expand Down

0 comments on commit 737f5ba

Please sign in to comment.