Skip to content

Commit edca00b

Browse files
authored
Merge pull request #5544 from Textualize/fix-ol-crash
Fix crash in Command Palette
2 parents c728d42 + 6e51f71 commit edca00b

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## [2.0.3] - 2025-02-16
9+
10+
### Fixed
11+
12+
- Fixed traceback from OptionList in Command Palette https://github.com/Textualize/textual/pull/5544
13+
814
## [2.0.2] - 2025-02-16
915

1016
### Fixed
@@ -2729,6 +2735,7 @@ https://textual.textualize.io/blog/2022/11/08/version-040/#version-040
27292735
- New handler system for messages that doesn't require inheritance
27302736
- Improved traceback handling
27312737

2738+
[2.0.3]: https://github.com/Textualize/textual/compare/v2.0.2...v2.0.3
27322739
[2.0.2]: https://github.com/Textualize/textual/compare/v2.0.1...v2.0.2
27332740
[2.0.1]: https://github.com/Textualize/textual/compare/v2.0.0...v2.0.1
27342741
[2.0.0]: https://github.com/Textualize/textual/compare/v1.0.0...v2.0.0

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "textual"
3-
version = "2.0.2"
3+
version = "2.0.3"
44
homepage = "https://github.com/Textualize/textual"
55
repository = "https://github.com/Textualize/textual"
66
documentation = "https://textual.textualize.io/"

src/textual/widgets/_option_list.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -834,10 +834,10 @@ def render_line(self, y: int) -> Strip:
834834
line_number = self.scroll_offset.y + y
835835
try:
836836
option_index, line_offset = self._lines[line_number]
837+
option = self.options[option_index]
837838
except IndexError:
838839
return Strip.blank(self.scrollable_content_region.width)
839840

840-
option = self.options[option_index]
841841
mouse_over = self._mouse_hovering_over == option_index
842842
component_class = ""
843843
if option.disabled:

0 commit comments

Comments
 (0)