Repository navigation
fix(editor): preserve navigation jump history - #305
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.
Ctrl-O and Ctrl-I currently miss several editor-owned navigation paths. Queued input can also race Project Search selections and LSP definition responses, leaving the new destination absent from the jump list when traversal runs. Counted and stationary jumps, plus the previous-context mark, have additional Vim parity gaps.
What Changed
Gas an absolute line jump and preserve a return location for successful stationary jumps.SetCursorPositionrequests and use it for bundled Git hunk navigation.How to Test
Place the cursor in one file, open Project Search, select a result in another file, and press Ctrl-O immediately after Enter. Expect the first Ctrl-O to return to the exact original file and position; Ctrl-I should reopen the result.
Invoke
gdon a symbol and press Ctrl-O before the definition response arrives. Expect Red to return after the destination commits, with Ctrl-I reopening the definition.Navigate with
]hor to the next inline comment, then press Ctrl-O. Expect a return to the source position.Run
3G, then Ctrl-O; repeat the previous-context command twice; and runG, move one line, then Ctrl-O. Expect absolute-line navigation, two-position toggling, and a usable stationary-jump return point.Run the focused regressions:
The exact committed build also passed retained manual smoke coverage for Project Search, Git hunks, inline comments, real rust-analyzer definition navigation, and Vim parity cases.