Skip to content

Commit 9a08a2d

Browse files
committed
optimize size
1 parent 9c9b011 commit 9a08a2d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

rich/console.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -996,12 +996,13 @@ def is_dumb_terminal(self) -> bool:
996996
@property
997997
def options(self) -> ConsoleOptions:
998998
"""Get default console options."""
999+
size = self.size
9991000
return ConsoleOptions(
1000-
max_height=self.size.height,
1001-
size=self.size,
1001+
max_height=size.height,
1002+
size=size,
10021003
legacy_windows=self.legacy_windows,
10031004
min_width=1,
1004-
max_width=self.width,
1005+
max_width=size.width,
10051006
encoding=self.encoding,
10061007
is_terminal=self.is_terminal,
10071008
)

0 commit comments

Comments
 (0)