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":