Skip to content

fix: Status bar cursor position not updating on workspace open#2167

Open
William-Laverty wants to merge 2 commits intoCodeEditApp:mainfrom
William-Laverty:fix/status-bar-initial-update
Open

fix: Status bar cursor position not updating on workspace open#2167
William-Laverty wants to merge 2 commits intoCodeEditApp:mainfrom
William-Laverty:fix/status-bar-initial-update

Conversation

@William-Laverty
Copy link

Summary

Fixes the status bar cursor position label not displaying line/column information until the first tab switch after opening a workspace.

Problem

The StatusBarCursorPositionLabel only subscribed to tabBarTabIdSubject (fired on tab changes) and used onAppear (which often fires before the workspace has restored its active tab). This meant the label stayed empty until the user manually switched tabs.

Fix

Added an additional .onReceive(editorManager.$activeEditor) observer so the cursor position label updates whenever the active editor changes, including during initial workspace restoration.

Changes

  • StatusBarCursorPositionLabel.swift: Subscribe to editorManager.$activeEditor publisher

Fixes #1729

@William-Laverty William-Laverty force-pushed the fix/status-bar-initial-update branch from ce5df54 to d2a9dbe Compare February 13, 2026 12:08
Reads the autocompleteBraces setting via @appsettings and passes it to the
SourceEditorConfiguration's behavior, enabling the setting to actually control
whether brackets are auto-completed in the editor.

Requires corresponding change in CodeEditSourceEditor.

Fixes CodeEditApp#1691
The status bar cursor position label relied solely on tabBarTabIdSubject
(a PassthroughSubject) and onAppear to get the current tab. When a workspace
was first opened, the selected tab was set during state restoration before the
status bar view subscribed to the subject, causing it to miss the initial value.

This adds an additional onReceive subscriber to the active editor's
$selectedTab publisher, which is a @published property and replays its current
value on subscription, ensuring the status bar updates immediately.

Fixes CodeEditApp#1729
@William-Laverty William-Laverty force-pushed the fix/status-bar-initial-update branch from d2a9dbe to f2c3278 Compare February 15, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐞 Status Bar does not update when workspace is first opened

1 participant