Repository navigation
Fix(tui): a new note opens in the editor always, despite the set default mode - #26
Open
spirit-of-light wants to merge 1 commit into
Open
spirit-of-light wants to merge 1 commit into
spirit-of-light wants to merge 1 commit into
Conversation
createNote opened the note with the default pane mode (or the mode remembered for that path) and then entered insert mode. With a preview or split default, you were typing into a buffer the screen didn't show. The new note's tab is now set to edit mode directly, which leaves the default pane mode and the remembered per-note modes unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Creating a note puts you in insert mode, but with the default pane mode set to preview or split, the new tab showed the preview. You were typing into a buffer you couldn't see.
createNoteopened the note throughopenNote, which picks the tab's mode fromDefaultPaneMode(or the mode remembered for that path), and then sent VimA. It now sets the new note's tab to edit mode directly. It doesn't go throughsetPaneMode, so with "retain view mode" on, the default pane mode and the remembered per-note modes are left as they were.Tests: new
TestCreateNoteOpensInEditModesets the default to preview, creates a note and expects edit mode. It fails onmain("new note opened in mode preview, want edit") and passes here.go test -race ./...,go vet ./...,go build ./cmd/zn,git diff --checkandbash scripts/sandbox.sh --smokepass. Checked by hand in the TUI: a new note shows the editor straight away.🤖 Generated with Claude Code