From e82a7488b5c4f76eca71ee37240a9611c78143e8 Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Fri, 6 Nov 2026 01:30:39 -0500 Subject: [PATCH] DOMNode declares refresh_lines beside refresh Widget.refresh_lines (#246) had no DOMNode default, so a walk over the DOM (Toad's ConversationEntry repaints its subtree) could not call it without a cast; refresh already has the node-level answer that a node painting nothing returns itself. Co-Authored-By: Claude Opus 5.5 --- src/textual/dom.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/textual/dom.py b/src/textual/dom.py index 68e2b8dd13..73591afd7e 100644 --- a/src/textual/dom.py +++ b/src/textual/dom.py @@ -2290,6 +2290,10 @@ def refresh( ) -> Self: return self + def refresh_lines(self) -> Self: + """A node that paints nothing has no lines to repaint (Widget paints them).""" + return self + def check_action(self, action: str, parameters: tuple[object, ...]) -> bool | None: """Check whether an action is enabled.