Scroll to the match a label resolves to #5
Labels
No labels
bug
design
docs
enhancement
good-first-issue
packaging
rendering
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/spoor#5
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Scroll the viewport to the match a label resolves to, so a pick never lands on something the user
cannot see.
Why
The content can be much taller than the screen —
main::grid_rowssizes the grid to hold all ofstdin, and
picker::pickstarts the viewport at the tail. Scrolling keys and a scroll indicatorexist, so off-screen matches are reachable by hand.
But labels are assigned to every match, while
drawskips any whose row is outside the viewport(
src/picker.rs). The key loop resolves a typed label by searchinglabelswith no viewportcheck at all, so typing a label for an off-screen match picks it blind: the user sees no label,
gets no feedback as the prefix narrows, and the action runs on a value never shown.
docs/research.md"Edge-case handling" already says the only competitor that lets you reachoff-screen matches is wezterm, which searches scrollback and scrolls to the picked match, and
records this as an open v1 decision ("clamp to the tail or scrollable hinting").
Sketch
typednarrows, if the candidates are all outside the viewport, scroll to the first one sothe user sees the labels they are choosing among.
--multi, where a toggled selection off-screen is invisible).--reverseand for label assignment whencontent is taller than the viewport.