diff --git a/ChangeLog.md b/ChangeLog.md index 2b51fae..17803ad 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -9,6 +9,8 @@ ([#47](https://github.com/davep/aging/pull/47)) - Added Python 3.14 as a tested/supported Python version. ([#48](https://github.com/davep/aging/pull/48)) +- Fixed a visual glitch with the "bounce bar" when an entry was wrapping its + content. ([#49](https://github.com/davep/aging/pull/49)) ## v1.0.0 diff --git a/src/aging/widgets/entry_viewer/entry_content.py b/src/aging/widgets/entry_viewer/entry_content.py index 67e155d..e7d9e9f 100644 --- a/src/aging/widgets/entry_viewer/entry_content.py +++ b/src/aging/widgets/entry_viewer/entry_content.py @@ -309,7 +309,11 @@ def render_line(self, y: int) -> Strip: text, no overriding colours. """ strip = super().render_line(y) - if self.scroll_offset.y + y == self.highlighted: + try: + option_index, _ = self._lines[self.scroll_offset.y + y] + except IndexError: + return strip + if option_index == self.highlighted: if highlight := self.get_visual_style("option-list--option-highlighted"): highlight_style = highlight.rich_style # Despite its name, Style.without_color removes more than