Top jump: surface the page head, not just the first selectable row
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
6787aace3c
commit
05f3dc9bc6
2 files changed
+7
No files matched your search
@@ -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
|
||||
|
||||
@@ -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":
|
||||
|
||||
Reference in new issue
Block a user