feat: bookmark lines and navigate them with Tab (#208) - #225
Merged
Conversation
Right-click a line to toggle a bookmark; a bookmarked line shows a yellow timestamp. Tab jumps to the next bookmark and Shift+Tab to the previous one, centering the view and wrapping around the ends (mirroring search navigation). Tab still completes a @tag while the autocomplete pop-up is up. Bookmarks pin to a new stable per-line BufferLine::id (a monotonic counter) instead of a positional index, so they follow their line across scrollback rotation and filter changes: a bookmark hidden by a filter reappears once the line is shown again. State and navigation live in graphics/screen.rs. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
matheuswhite
force-pushed
the
feat/208-bookmarks
branch
from
July 22, 2026 20:42
dd60136 to
e640980
Compare
Every bookmark shared the same yellow-background timestamp, so Tab/Shift+Tab navigation gave no cue which one you'd landed on. Split the styling in two: the current bookmark keeps the full yellow-background highlight, while every other bookmark drops to a subtler yellow foreground on the normal background — so all bookmarks stay visible and the focused one stands out. Threads the existing `current_bookmark` through the render path (`to_lines` -> `to_normal_line`/`to_search_line`) into `timestamp_line`. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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
Closes #208.
Adds line bookmarks so jumping to a specific line in a long history no longer means scrolling and reading line by line.
Tabjumps to the next bookmark,Shift+Tabto the previous one — centering the view and wrapping around the ends, mirroring search navigation. In the command bar,Tabstill completes a@tagwhile the autocomplete pop-up is up (issue Navigation through command tags #177 behavior preserved).Design: stable per-line identity
Bookmarks pin to a new monotonic
BufferLine::idrather than a positional index, so they follow their line through:line, butidnever changes;A
current_bookmarkcursor (also keyed byid) keepsTab/Shift+Tabrobust even when a jump is clamped near the buffer ends. Bookmark state and navigation live ingraphics/screen.rs;Ctrl+Lclears bookmarks along with the screen.Tests
graphics/screen.rscovering toggle, off-content clicks, current-bookmark tracking, clear, the purenext_bookmark_indexselection logic (anchor / step / wrap / fallback / empty), and end-to-end navigation cycling by id.cargo test --bin scope(204) andcargo test --test tui_e2e(12, 1 ignored). Build clean under#![deny(warnings)].Tab/Shift+Tabcenter and cycle through bookmarks with the viewport scrolling correctly.🤖 Generated with Claude Code