Repository navigation
feat(picker): modernize buffer navigation - #302
Merged
Merged
Conversation
fcoury
force-pushed
the
fcoury/modern-buffer-picker
branch
from
August 21, 2026 22:11
38f07fb to
74ad804
Compare
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.
Why
The buffer picker lagged behind Red's other navigation surfaces: it showed raw paths with generic icons, ignored unsaved/current-buffer state, preserved list order instead of visit history, and offered neither previews nor split navigation. Simply shortening paths would also have broken directory-based fuzzy matching.
What changed
plugins/buffer_picker.hkaround filename-first rows, muted parent directories, file-type icons, current/modified indicators, modified counts, and previous-buffer preselection.Alt-ppreview toggling plusCtrl-s/Ctrl-vsplit actions that restore the saved cursor; keep unnamed buffers in the picker and explain why they cannot open in a split.How to Test
Open several files, including two files with the same basename in different directories; edit one without saving and switch among them to establish a recent-buffer order.
Press
Ctrl-jorSpace b. Verify filenames lead each row, directories and file icons distinguish duplicates, the current/modified markers are accurate, and the previous buffer is initially selected.Search by both filename and parent directory. Verify matching and highlighting work across the complete workspace-relative path.
Select the modified buffer and toggle
Alt-poff and on. Verify the preview shows the unsaved in-memory contents rather than the on-disk version.Move the cursor after a Unicode character, reopen the picker, and use
Ctrl-sorCtrl-v. Verify the requested split opens at the same line and character.Select
[No Name]and attempt a split. Verify Red explains that the buffer must be saved and leaves the picker open.Run targeted coverage:
Validated locally: 2,116 library tests passed (2 ignored), both bundled-plugin self-check tests passed, and
cargo clippy --all-targets --all-features -- -D warningscompleted cleanly.