From 07aaee2ef1ae12dad77177de4dee3017d64e9838 Mon Sep 17 00:00:00 2001 From: William Laverty Date: Sun, 15 Feb 2026 01:03:31 -0800 Subject: [PATCH 1/2] Pass autocompleteBraces setting to source editor 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 #1691 --- CodeEdit/Features/Editor/Views/CodeFileView.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CodeEdit/Features/Editor/Views/CodeFileView.swift b/CodeEdit/Features/Editor/Views/CodeFileView.swift index f22f6cce3d..c54f0ddac4 100644 --- a/CodeEdit/Features/Editor/Views/CodeFileView.swift +++ b/CodeEdit/Features/Editor/Views/CodeFileView.swift @@ -25,6 +25,8 @@ struct CodeFileView: View { @AppSettings(\.textEditing.defaultTabWidth) var defaultTabWidth + @AppSettings(\.textEditing.autocompleteBraces) + var autocompleteBraces @AppSettings(\.textEditing.indentOption) var indentOption @AppSettings(\.textEditing.lineHeightMultiple) @@ -131,6 +133,7 @@ struct CodeFileView: View { ), behavior: .init( isEditable: isEditable, + autocompleteBraces: autocompleteBraces, indentOption: indentOption.textViewOption(), reformatAtColumn: reformatAtColumn ), From f2c32783cae4eabe8ae5af640c3c05f9ec77c01b Mon Sep 17 00:00:00 2001 From: William Laverty Date: Sun, 15 Feb 2026 01:05:09 -0800 Subject: [PATCH 2/2] Fix status bar not updating when workspace is first opened 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 #1729 --- .../Views/StatusBarItems/StatusBarCursorPositionLabel.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CodeEdit/Features/StatusBar/Views/StatusBarItems/StatusBarCursorPositionLabel.swift b/CodeEdit/Features/StatusBar/Views/StatusBarItems/StatusBarCursorPositionLabel.swift index 6939fca4ec..89aa3f45de 100644 --- a/CodeEdit/Features/StatusBar/Views/StatusBarItems/StatusBarCursorPositionLabel.swift +++ b/CodeEdit/Features/StatusBar/Views/StatusBarItems/StatusBarCursorPositionLabel.swift @@ -38,6 +38,9 @@ struct StatusBarCursorPositionLabel: View { .onReceive(editorManager.tabBarTabIdSubject) { _ in updateSource() } + .onReceive(editorManager.activeEditor.$selectedTab) { _ in + updateSource() + } } struct LineLabel: View {