Skip to content

Commit 8362f49

Browse files
committed
Fix for focus
Signed-off-by: Wouter01 <[email protected]>
1 parent 120e3a7 commit 8362f49

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

CodeEdit/Features/SplitView/EditorView.swift

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,26 @@ struct EditorView: View {
2424
}
2525

2626
var body: some View {
27-
switch tabgroup {
28-
case .one(let detailTabGroup):
29-
WorkspaceTabGroupView(tabgroup: detailTabGroup, focus: $focus)
30-
.transformEnvironment(\.edgeInsets) { insets in
31-
switch isAtEdge {
32-
case .all:
33-
insets.top += toolbarHeight
34-
insets.bottom += StatusBarView.height + 5
35-
case .top:
36-
insets.top += toolbarHeight
37-
case .bottom:
38-
insets.bottom += StatusBarView.height + 5
39-
default:
40-
return
27+
VStack {
28+
switch tabgroup {
29+
case .one(let detailTabGroup):
30+
WorkspaceTabGroupView(tabgroup: detailTabGroup, focus: $focus)
31+
.transformEnvironment(\.edgeInsets) { insets in
32+
switch isAtEdge {
33+
case .all:
34+
insets.top += toolbarHeight
35+
insets.bottom += StatusBarView.height + 5
36+
case .top:
37+
insets.top += toolbarHeight
38+
case .bottom:
39+
insets.bottom += StatusBarView.height + 5
40+
default:
41+
return
42+
}
4143
}
42-
}
43-
case .vertical(let data), .horizontal(let data):
44-
SubEditorView(data: data, focus: $focus)
44+
case .vertical(let data), .horizontal(let data):
45+
SubEditorView(data: data, focus: $focus)
46+
}
4547
}
4648
}
4749

0 commit comments

Comments
 (0)