Repository navigation
Fix(tui): [b and ]b switch tabs from every view and panel - #27
Merged
adibhanna merged 1 commit intoNov 1, 2026
Merged
Conversation
With Vim mode on, `[b` / `]b` (and `gt` / `gT`) switched tabs only while a note editor had focus, because the two-key sequences were matched only in the editor's key path. On Home, Tasks, Calendar, the database views and the side panels the first key went straight to the surface, so the sequence never completed. handleKey now matches the buffer and tab sequences before handing a key to any surface other than a note editor, honouring custom keymaps. When the second key does not complete a sequence, the held first key is replayed to the surface and the second follows, so `]` month navigation and `gg` keep working, one key later. Counts such as `3]b` stay editor-only. The held key lasts only until the next key: an overlay, chord, leader key, Ctrl+W prefix, mouse click, focus moving to a note editor or Vim mode turning off drops it without replaying it, and Esc cancels it. Tests, the cycling one red first: `]b` / `[b` from a view, a key that does not complete the sequence reaching the view, and a held key dropped by each of those paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
adibhanna
added a commit
that referenced
this pull request
Nov 1, 2026
…pirit-of-light) With the review follow-ups on top of the contributor's commits.
Contributor
|
Thanks! It's merged into
|
adibhanna
added a commit
that referenced
this pull request
Nov 1, 2026
…it-of-light) With six review follow-ups on top of the contributor's commits. The merge also updates ownsKey from #27's follow-up, which read v.dayFocus, a field #30 removes: it now checks that the calendar grid has focus, so [ and ] still change the month at once.
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.
With Vim mode on,
[b/]b(andgt/gT) switched tabs only while a note editor had focus. On Home, Tasks, Calendar, the database views and the side panels nothing happened, because the two-key sequences were matched only ineditorKey, so the first key went straight to the surface and the sequence never completed.handleKeynow matches the buffer and tab sequences (tabSequenceKey) before handing a key to any surface other than a note editor, honouring custom keymaps. When the second key doesn't complete a sequence, the held first key is replayed to the surface and the second follows, so]month navigation andggkeep working, one key later. Counts such as3]bstay editor-only.The held key lasts only until the next key. An overlay, chord, leader key, Ctrl+W prefix, mouse click, focus moving to a note editor or Vim mode turning off drops it without replaying it, and Esc cancels it.
Tests in
tabsequence_test.go:]b/[bcycle tabs from a view (fails onmain: the active tab stays 0), a key that doesn't complete the sequence reaches the view, and a held key is dropped by each of the paths above.go test -race ./...,go vet ./...,go build ./cmd/zn,git diff --checkandbash scripts/sandbox.sh --smokepass. Checked by hand in the TUI:[b/]bswitch tabs from Home and Tasks.🤖 Generated with Claude Code