Skip to content

Commit 378478a

Browse files
Add Window Commands to Group
SwiftUI cannot build because we have too many window commands in the commands builder. This just puts a few in a `Group` to allow SwiftUI to handle it.
1 parent 61a5e67 commit 378478a

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

CodeEdit/Features/WindowCommands/CodeEditCommands.swift

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,18 @@ struct CodeEditCommands: Commands {
1212
private var sourceControlIsEnabled
1313

1414
var body: some Commands {
15-
MainCommands()
16-
FileCommands()
17-
ViewCommands()
18-
FindCommands()
19-
NavigateCommands()
20-
TasksCommands()
21-
if sourceControlIsEnabled { SourceControlCommands() }
22-
EditorCommands()
23-
ExtensionCommands()
24-
WindowCommands()
15+
Group { // SwiftUI limits to 9 items in an initializer, so we have to group every 9 items.
16+
MainCommands()
17+
FileCommands()
18+
ViewCommands()
19+
FindCommands()
20+
NavigateCommands()
21+
TasksCommands()
22+
if sourceControlIsEnabled { SourceControlCommands() }
23+
EditorCommands()
24+
ExtensionCommands()
25+
WindowCommands()
26+
}
2527
HelpCommands()
2628
}
2729
}

0 commit comments

Comments
 (0)