feat: pager navigation β search, jump-to-line, page indicator, arrow keys#882
Open
makingmusic wants to merge 1 commit intocharmbracelet:masterfrom
Open
feat: pager navigation β search, jump-to-line, page indicator, arrow keys#882makingmusic wants to merge 1 commit intocharmbracelet:masterfrom
makingmusic wants to merge 1 commit intocharmbracelet:masterfrom
Conversation
β¦row key paging Add several navigation features to the pager view: - In-document search (/ to search, n/N for next/prev match) - Jump to line (:42) or percentage (:50%) - Page indicator (pg X/Y) in status bar when content exceeds one page - Left/right arrow keys for page back/forward - Comprehensive test suite covering utils, UI logic, and E2E CLI tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
What issue is this based on? |
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.
Summary
/to search,n/Nto cycle through matches, match counter in status bar:42jumps to line 42,:50%jumps to 50% of the documentpg X/Yshown in the status bar when content exceeds one pageβ/βto page back/forward (full viewport page)Design notes
Bodycontent (pre-glamour) to avoid false matches on ANSI codes and line-number gutterspagerStateSearch,pagerStateJumpToLine) integrate with the existing state machineinInputMode()gates top-level key interception inui.goso search/jump inputs receiveesc,q, etc.leftarrow repurposed from "back to listing" (still available viah/delete/esc) to page-back navigationTest plan
go test ./...passes (unit + E2E)/,n/N,:N,:N%,β/β, page indicatorescclears search before returning to file listingh/deletestill return to file listingπ€ Generated with Claude Code