Repository navigation
mac editor: the Vim status line sits at the bottom of the editor, not the window - #442
Merged
Merged
Conversation
… the window Owner report: "in vim mode, commands / the current modes show up at the bottom of the app window rather than at the bottom of the editor window. So when there's the 'problem' window below where you're editing, it feels unnatural." `VimModeStatusItem` was an item of the global `StatusBar`, so with the Problems panel open the mode indicator sat below the problems list — two panes away from the text it describes. In vim the status line belongs to the window being edited. It is now `VimStatusLine`, the last row of `EditorPane`, directly under `SourceEditorView` and above `CaptureBar`/`BridgeBar`: it follows the editor when the Problems panel opens and stays in the editor half when the preview is beside it. The `:`/`/` command line shares that row. Chrome matches the bars around it (`.font(.caption)`, `.background(.bar)`, 8/3 padding). With the preference off `VimMode.Status.shared.indicator` is nil and the body produces no view, so the editor gains no empty strip. `status.vimMode` and `status.vimCommandLine` are unchanged; the command table and the README now say where the line is. `VimStatusLinePlacementTests` pins the placement geometrically in the whole `ContentView`: turning Vim on must take one caption row off the bottom of the source editor while the editor pane's own frame stays put (a row added to the window's status bar would shrink the pane instead), the `:` line must not add a second row, and turning Vim off must give the row back exactly. All four fail on b529e9d with "turning Vim on must take one caption row off the source editor (lost 0.0 pt)". Also documents ⌥⇧↓ / ⌥⇧↑ (duplicateLine, #419) in the README shortcut table: that command landed without a README row, so `CommandTableTests` has been failing on main since ec84cf3 and would have failed on this branch too. Implementation-Agent: Claude Opus 5 (lane mac-editor-ux, linux-primary) Commit-Executor: Claude Opus 5 (direct git, observed Cursor usage limit) Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
d-q222
added a commit
that referenced
this pull request
Sep 14, 2026
Merged origin/main (includes #413 Re-indent, #419 duplicate line, #442 Vim status line, #445 caret fix). Conflict in apps/mac/README.md: kept both the ⌘L Go to Line row (ours) and the ⌃I / Re-indent Document rows (theirs). AccessibilityCommands.swift and CommandPalette.swift auto-merged with both enum cases, entries, and palette actions. Ran: cd apps/mac && swift test --filter 'GoToLineTests|CommandTableTests' Executed 17 tests, with 0 failures (0 unexpected) in 0.125 (0.126) seconds. grep -rn '<<<<<<<\|>>>>>>>' apps/mac: empty. README shortcuts unique. Next: merge origin/main into editor-folding (#423). Implementation-Agent: cursor-agent cursor-grok-4.6 Commit-Executor: cursor-agent Lane-Owner: daniel-parent (mac-m5pro-dq222) Co-authored-by: Cursor <[email protected]>
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.
Owner report:
What was wrong
VimModeStatusItemwas an item of the globalStatusBar, the last row of the detail column. The column isso with the Problems panel open the mode indicator sat below the problems list — two panes away from the caret it describes. In vim the status line belongs to the window being edited.
The change
VimStatusLineis now the last row ofEditorPane, directly underSourceEditorViewand aboveCaptureBar/BridgeBar. It follows the editor when the Problems panel opens, and stays in the editor half when the preview is beside it rather than spanning the window. The://command line shares that row. Chrome matches the bars around it:.font(.caption),.background(.bar), 8/3 padding.With the preference off
VimMode.Status.shared.indicatoris nil and the body produces no view, so the editor gains no empty strip — asserted, not assumed.status.vimModeandstatus.vimCommandLineare unchanged. The command-table description and the README now say where the line is.The regression test
VimStatusLinePlacementTestspins the placement with real geometry in the wholeContentView, asFlashTeXMacAppbuilds it. SwiftUI's accessibility tree is not reachable from a hostedNSHostingViewhere (accessibilityChildren()comes back empty), so the tests measure NSView frames instead::must not add a second row;On
b529e9d3all four fail withAlso in here: a README row that was missing
duplicateLine(⌥⇧↓ / ⌥⇧↑, #419) landed without a row in the README shortcut table, soCommandTableTests.testCommandTableMatchesREADMEShortcutsandtestEveryCommandHasAREADMERowAndEveryRowACommandhave been failing on main since ec84cf3. This PR edits the same table, and would have shipped red without it, so the row is added here. Flagging it rather than burying it.Gate
Fresh build directory,
apps/mac, macOS 26.6 / Swift 6.3.3:swift build && swift test --skip NearbyInterfaceTests --skip NearbyLANInterfaceTestsb529e9d3CommandTableTestsabove)Test-name diff between the two runs is exactly the four new tests; nothing was lost or newly skipped.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu