Add PageUp/PageDown/Home/End navigation - #65
Open
HoneyHazard wants to merge 1 commit into
Open
Conversation
wiremix had no way to move the selection by more than one item at a time - only MoveUp/MoveDown (j/k, arrows), which is slow to navigate with on a system with many devices/streams. PageUp/PageDown/Home/End are all listed as valid SpecialKey values in the keybinding docs, but no actions existed that did anything more than single-item movement, so binding them to the existing MoveUp/MoveDown actions wouldn't have given real paging/jump behavior. Adds four new actions, bound by default to the matching keys: - PageUp/PageDown jump the selection by however many items are currently visible on screen (ObjectList already computes this every frame for scroll positioning - now cached as `page_size` and reused for paging), clamping to the first/last item if the page would overrun the list. - MoveFirst/MoveLast (Home/End) jump straight to the first/last item, reading directly from View::object_ids() rather than walking one item at a time. All four are also wired into the help menu's scroll (a fixed 10-line step for PageUp/PageDown there, and 0/u16::MAX for Home/End relying on HelpWidget::render()'s existing bottom-of-list clamp - the help view doesn't track a visible-line count the way the main object lists do). Tested: cargo test (150/150 passing, including 6 new tests covering page movement, first/last jumps, overflow-clamping at both ends, and the help-menu case for all four actions), cargo fmt --check / cargo clippy -- -D warnings / cargo doc (matching wiremix's CI) all clean, manual verification in a live terminal at two different sizes (one where paging overflows to the list's end, one where it's a real mid-list jump).
HoneyHazard
force-pushed
the
pgup-pgdown-navigation
branch
from
August 5, 2026 09:17
81bea75 to
5b78490
Compare
HoneyHazard
marked this pull request as ready for review
August 6, 2026 08:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
That being said, I hope these can be helpful and useful additions that users could appreciate.
wiremix had no way to move the selection by more than one item at a time - only
MoveUp/MoveDown(j/k, arrows), which is slow to navigate with on a system with many devices/streams.PageUp/PageDown/Home/Endare all listed as validSpecialKeyvalues in the keybinding docs, but no actions existed that did anything more than single-item movement, so binding them to the existingMoveUp/MoveDownactions wouldn't have given real paging/jump behavior.Adds four new actions, bound by default to the matching keys:
PageUp/PageDownjump the selection by however many items are currently visible on screen (ObjectListalready computes this every frame for scroll positioning - now cached aspage_sizeand reused for paging), clamping to the first/last item if the page would overrun the list.MoveFirst/MoveLast(Home/End) jump straight to the first/last item, reading directly fromView::object_ids()rather than walking one item at a time.u16::MAXfor Home/End relying onHelpWidget::render()'s existing bottom-of-list clamp - the help view doesn't track a visible-line count the way the main object lists do).New default keybindings:
Like every other default binding, these are fully overridable/removable from the config file (e.g.
{ key = "PageDown", action = "Nothing" }to disable).Tested:
cargo test: 150/150 passing, including 6 new tests covering page movement, first/last jumps, overflow-clamping at both ends, and the help-menu case for all four actionscargo fmt --check/cargo clippy -- -D warnings/cargo doc(matching this repo's CI): all clean