Repository navigation
Conversation
o / O replace the editor query and results, with no way back to where you jumped from. Each jump now pushes the current query, its result-table context (with FK metadata), cursor position and target database onto a back-stack (max 50). `b` in the results pane pops it, re-runs that query and restores the cursor once the table renders. Repeated jumps can be unwound one at a time. `b` is only active while the stack is non-empty and shows as "Back" in the footer then; o / O / b are listed in help. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use ctrl+o, vim's jump-list "go back", instead of b. o / O / back loaded the query through the history loader, which focuses the editor, so every jump left the results pane. Re-focus the results table after loading when navigation started there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Problem
o(follow FK) andO(show referencing rows) replace the editor query and the results grid. There is no way back to the row you jumped from, apart from digging through query history and finding the row again by hand.Change
o/Ojump pushes a back-stack entry: the editor query, the active result-table context (including its already-loaded FK metadata), the cursor cell and the target database. The stack holds at most 50 entries.Ctrl+O(vim's jump-list "back") in the results pane pops the stack and re-runs that query. Once the table renders, the cursor goes back to the cell you jumped from. Repeated jumps unwind one step at a time.o/Owork again right away.Ctrl+Ois only allowed while the stack is non-empty. In that case it shows as Back in the footer.o,OandCtrl+Oare now listed in the?help.o/O/Ctrl+O. Before, loading the query into the editor moved focus to the query pane on every jump.Tests
tests/ui/keybindings/test_navigation_back.py: a real SQLite DB with an FK. Jump fromposts.user_id, thenCtrl+Orestores the original query, row count and cursor(1, 1). A secondCtrl+Ois a no-op. The results table keeps focus throughout. Also checks thatCtrl+Ois bound tonavigate_backand only allowed when history exists.o→Esc(on a failed jump) →Ctrl+O: the query and cursor were restored.Complements #365.
🤖 Generated with Claude Code