Remember editor pane visibility - #519
Draft
leevi2010-cursor wants to merge 1 commit into
Draft
Conversation
schuyler
requested changes
Jul 11, 2026
schuyler
left a comment
Owner
There was a problem hiding this comment.
Thanks for the PR, @leevi2010-cursor!
Issues
- Overloads a user-facing preference: hiding or restoring the editor pane silently writes
editorStartInPreviewMode— the explicit "Start in preview mode" Preferences checkbox — so a user's deliberate opt-in gets cleared (and the checkbox visibly flips) as a side effect of a View-menu action, where a dedicated key or window state restoration would keep the two concepts separate. - Untested no-op interaction: no test covers the case where the last-visible-pane guard blocks the toggle, which is the interaction most likely to silently corrupt the remembered preference.
Suggestions
- A one-line comment at the call site explaining the "write only on actual change" gate and its relationship to the last-visible-pane guard would make the coupling legible.
- The asymmetry between
toggleEditorPane:(writes the preference) andtogglePreviewPane:(doesn't) is unexplained, so a note on the intent would help. - A test asserting
togglePreviewPane:never toucheseditorStartInPreviewModewould lock in that intentional asymmetry.
14 tasks
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.
Summary
Remember the user's editor pane choice when they use View > Hide Editor Pane or Restore Editor Pane.
This makes the next document window honor the most recent explicit editor-pane choice without adding another preference.
Testing
MPPaneToggleTests: 32 tests pass