Skip to content

Commit

Permalink
fix(option list): fix render cache option indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
TomJGooding committed Jan 16, 2025
1 parent dc71564 commit 7381e9c
Show file tree
Hide file tree
Showing 3 changed files with 185 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/textual/widgets/_option_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,11 @@ def _add_lines(
assert self._lines is not None
assert self._spans is not None

for index, content in enumerate(new_content, len(self._lines)):
for content in new_content:
if isinstance(content, Option):
height = len(
self._render_option_content(
index, content, "", width - self._left_gutter_width()
option_index, content, "", width - self._left_gutter_width()
)
)

Expand Down
Loading

0 comments on commit 7381e9c

Please sign in to comment.