Repository navigation
fix(buffers): toggle between recently used buffers - #276
Merged
Merged
Conversation
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.
Space Spacecurrently shares theNextBufferaction withSpace n, so it cycles through every open buffer instead of returning to the last one used.This adds an
AlternateBufferaction and mapsSpace Spaceto it. Buffer history uses stable IDs, follows explicit navigation and window focus, and skips closed buffers. Temporary selections made for LSP edits do not change that history.Space nandSpace pkeep their existing sequential behavior. The command palette and getting-started guide describe the new shortcut.How to Test
Space n. From the third buffer, pressSpace Spacerepeatedly. It should alternate between the second and third buffers without returning to the first.Space pto visit another buffer, then pressSpace Space. It should return to the buffer you just left. Verify thatSpace nandSpace pstill traverse the buffer list in order.:bd, then useSpace Space. It should switch only to a remaining, previously visited buffer. With no other visited buffer, the shortcut should do nothing.cargo test --lib buffer. The regression tests cover the actual key chord, window focus, buffer removal, temporary LSP selections, and command-palette shortcuts.Local validation at
2fcfc72: all 138 buffer-related tests passed; the full library rerun passed with 1,943 tests passed and one ignored; formatting andcargo clippy --all-targets --all-features -- -D warningspassed. One format-on-save test failed on a missing temporary output file during the first full run, then passed both in isolation and in the full rerun.