File tree Expand file tree Collapse file tree 2 files changed +22
-13
lines changed
CodeEdit/Features/Tabs/Views Expand file tree Collapse file tree 2 files changed +22
-13
lines changed Original file line number Diff line number Diff line change @@ -38,18 +38,6 @@ struct TabBarContextMenu: ViewModifier {
38
38
func body( content: Content ) -> some View {
39
39
content. contextMenu ( menuItems: {
40
40
Group {
41
- Button ( " Split Up " ) {
42
- moveToNewSplit ( . top)
43
- }
44
- Button ( " Split Down " ) {
45
- moveToNewSplit ( . bottom)
46
- }
47
- Button ( " Split Left " ) {
48
- moveToNewSplit ( . leading)
49
- }
50
- Button ( " Split Right " ) {
51
- moveToNewSplit ( . trailing)
52
- }
53
41
Button ( " Close Tab " ) {
54
42
withAnimation {
55
43
tabs. closeTab ( item: item)
@@ -121,6 +109,21 @@ struct TabBarContextMenu: ViewModifier {
121
109
}
122
110
. disabled ( true )
123
111
}
112
+
113
+ Divider ( )
114
+
115
+ Button ( " Split Up " ) {
116
+ moveToNewSplit ( . top)
117
+ }
118
+ Button ( " Split Down " ) {
119
+ moveToNewSplit ( . bottom)
120
+ }
121
+ Button ( " Split Left " ) {
122
+ moveToNewSplit ( . leading)
123
+ }
124
+ Button ( " Split Right " ) {
125
+ moveToNewSplit ( . trailing)
126
+ }
124
127
} )
125
128
}
126
129
Original file line number Diff line number Diff line change @@ -411,7 +411,11 @@ struct TabBarView: View {
411
411
}
412
412
}
413
413
}
414
-
414
+ . background {
415
+ if prefs. preferences. general. tabBarStyle == . native {
416
+ TabBarAccessoryNativeBackground ( dividerAt: . none)
417
+ }
418
+ }
415
419
}
416
420
// Tab bar tools (e.g. split view).
417
421
trailingAccessories
@@ -464,6 +468,7 @@ struct TabBarView: View {
464
468
id: \. offset
465
469
) { index, tab in
466
470
Button {
471
+ tabManager. activeTabGroup = tabgroup
467
472
tabgroup. historyOffset += index + 1
468
473
} label: {
469
474
HStack {
@@ -491,6 +496,7 @@ struct TabBarView: View {
491
496
id: \. offset
492
497
) { index, tab in
493
498
Button {
499
+ tabManager. activeTabGroup = tabgroup
494
500
tabgroup. historyOffset -= index + 1
495
501
} label: {
496
502
HStack {
You can’t perform that action at this time.
0 commit comments