From 05f3dc9bc633a8a6ca100d3898ca29255f6f8a4e Mon Sep 17 00:00:00 2001 From: Jean-Pierre Martineau Date: Sat, 8 Aug 2026 19:11:00 -0400 Subject: [PATCH] Top jump: surface the page head, not just the first selectable row MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shift+F5 (and Home) used to park the first choice under its pinned heading copies; now the scroll goes with it, so the headings and their preamble come back for real — on the select lists and the node page. Co-Authored-By: Claude Fable 5 --- meshterm/ui/node_detail_screen.py | 3 +++ meshterm/ui/tui/select.py | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/meshterm/ui/node_detail_screen.py b/meshterm/ui/node_detail_screen.py index 7688d58..946a9b5 100644 --- a/meshterm/ui/node_detail_screen.py +++ b/meshterm/ui/node_detail_screen.py @@ -564,6 +564,9 @@ class NodeDetailScreen(Screen): if n: self._row_index = 0 self._sync_route_sel(focus) + # On a terminal too short for the pinned layout the frame follows the cursor; + # jumping home should surface the very top of the page, header included. + self.scroll_to_top() elif action in ("end", "ctrl_end"): if n: self._row_index = n - 1 diff --git a/meshterm/ui/tui/select.py b/meshterm/ui/tui/select.py index 60fd636..fc8534a 100644 --- a/meshterm/ui/tui/select.py +++ b/meshterm/ui/tui/select.py @@ -627,7 +627,11 @@ class SelectScreen(Screen): elif action == "pagedown": self._index = min(len(choices) - 1, self._index + self._page_step) if choices else 0 elif action in ("home", "ctrl_home"): + # The jump goes to the very top of the *page*, not just the first choice: the + # rows above it (a heading, its preamble, a lead-in note) scroll back into + # view too, rather than staying folded behind their pinned stand-ins. self._index = 0 + self.scroll_to_top() elif action in ("end", "ctrl_end"): self._index = max(0, len(choices) - 1) elif action == "ctrl_pagedown":