Skip to content

Commit 476c16a

Browse files
committed
faster
1 parent 6a75cc7 commit 476c16a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/textual/widgets/_option_list.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,9 +382,12 @@ def get_content_width(self, container: Size, viewport: Size) -> int:
382382
options = console.options
383383
padding = self.get_component_styles("option-list--option").padding
384384
padding_width = padding.width
385-
return max(
386-
Measurement.get(console, options, option.prompt).maximum + padding_width
387-
for option in self._options
385+
return (
386+
max(
387+
Measurement.get(console, options, option.prompt).maximum
388+
for option in self._options
389+
)
390+
+ padding_width
388391
)
389392

390393
def get_content_height(self, container: Size, viewport: Size, width: int) -> int:

0 commit comments

Comments
 (0)