From 5f89bc2fec9cabe2c930780c43bfef3fec2edfb0 Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Fri, 6 Nov 2026 02:08:57 -0500 Subject: [PATCH] Repainting every line is repaint_lines; refresh_lines keeps its one meaning #246 and #247 declared refresh_lines() on Widget and DOMNode to mean "repaint every line", but ScrollView already declares refresh_lines(y_start, line_count=1), the range refresh Log and TextArea call. A no-argument call on a ScrollView raised TypeError, and Toad's block navigation calls it on every child, so every fade repaint of a scrolling block failed on the installed Toad. The new meaning takes its own name. Nothing in Textual's src, tests or docs calls the no-argument form; TextArea's four calls pass a line and keep ScrollView's meaning. Found and proven by claude-b-ui (Toad's six failing test files: 10 passed with this plus Toad's three caller renames). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01XbFMSqJMarXn2ZE8iAL7Sd --- src/textual/dom.py | 2 +- src/textual/widget.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/textual/dom.py b/src/textual/dom.py index 73591afd7e..3512458447 100644 --- a/src/textual/dom.py +++ b/src/textual/dom.py @@ -2290,7 +2290,7 @@ def refresh( ) -> Self: return self - def refresh_lines(self) -> Self: + def repaint_lines(self) -> Self: """A node that paints nothing has no lines to repaint (Widget paints them).""" return self diff --git a/src/textual/widget.py b/src/textual/widget.py index cd7d1b6fa7..f85b116751 100644 --- a/src/textual/widget.py +++ b/src/textual/widget.py @@ -4245,7 +4245,7 @@ def refresh( self.check_idle() return self - def refresh_lines(self) -> Self: + def repaint_lines(self) -> Self: """Paint every line again from the content already rendered. For a change over the lines and not in them: an animation frame tinting the same