From e64ef26e983e0c7ed0d11b9e0944cf7202d4d50a Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Tue, 2 Dec 2025 14:01:03 +0000 Subject: [PATCH 1/2] :bug: Fix visual glitch when drawing selection in wrapped entry --- ChangeLog.md | 2 ++ src/aging/widgets/entry_viewer/entry_content.py | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 2b51fae..910a81f 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. ## 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 From ee7901449cb525dac0ba4d7d359ac3b73d4deb87 Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Tue, 2 Dec 2025 14:03:26 +0000 Subject: [PATCH 2/2] :books: Link the ChangeLog to the PR --- ChangeLog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 910a81f..17803ad 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -10,7 +10,7 @@ - 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. + content. ([#49](https://github.com/davep/aging/pull/49)) ## v1.0.0