mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
macos: rename all the 2-suffix
This commit is contained in:
@ -77,7 +77,7 @@ struct TerminalView<ViewModel: TerminalViewModel>: View {
|
|||||||
DebugBuildWarningView()
|
DebugBuildWarningView()
|
||||||
}
|
}
|
||||||
|
|
||||||
Ghostty.TerminalSplit2(node: $viewModel.surfaceTree)
|
Ghostty.TerminalSplit(node: $viewModel.surfaceTree)
|
||||||
.ghosttyApp(ghostty.app!)
|
.ghosttyApp(ghostty.app!)
|
||||||
.ghosttyConfig(ghostty.config!)
|
.ghosttyConfig(ghostty.config!)
|
||||||
.focused($focused)
|
.focused($focused)
|
||||||
|
@ -7,7 +7,7 @@ extension Ghostty {
|
|||||||
/// split direction by splitting the terminal.
|
/// split direction by splitting the terminal.
|
||||||
///
|
///
|
||||||
/// This also allows one split to be "zoomed" at any time.
|
/// This also allows one split to be "zoomed" at any time.
|
||||||
struct TerminalSplit2: View {
|
struct TerminalSplit: View {
|
||||||
/// The current state of the root node. This can be set to nil when all surfaces are closed.
|
/// The current state of the root node. This can be set to nil when all surfaces are closed.
|
||||||
@Binding var node: SplitNode?
|
@Binding var node: SplitNode?
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ extension Ghostty {
|
|||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ZStack {
|
ZStack {
|
||||||
TerminalSplitRoot2(
|
TerminalSplitRoot(
|
||||||
node: $node,
|
node: $node,
|
||||||
zoomedSurface: $zoomedSurface
|
zoomedSurface: $zoomedSurface
|
||||||
)
|
)
|
||||||
@ -36,7 +36,7 @@ extension Ghostty {
|
|||||||
|
|
||||||
/// The root of a split tree. This sets up the initial SplitNode state and renders. There is only ever
|
/// The root of a split tree. This sets up the initial SplitNode state and renders. There is only ever
|
||||||
/// one of these in a split tree.
|
/// one of these in a split tree.
|
||||||
private struct TerminalSplitRoot2: View {
|
private struct TerminalSplitRoot: View {
|
||||||
/// The root node that we're rendering. This will be set to nil if all the surfaces in this tree close.
|
/// The root node that we're rendering. This will be set to nil if all the surfaces in this tree close.
|
||||||
@Binding var node: SplitNode?
|
@Binding var node: SplitNode?
|
||||||
|
|
||||||
@ -62,14 +62,14 @@ extension Ghostty {
|
|||||||
Color(.clear)
|
Color(.clear)
|
||||||
|
|
||||||
case .noSplit(let leaf):
|
case .noSplit(let leaf):
|
||||||
TerminalSplitLeaf2(
|
TerminalSplitLeaf(
|
||||||
leaf: leaf,
|
leaf: leaf,
|
||||||
neighbors: .empty,
|
neighbors: .empty,
|
||||||
node: $node
|
node: $node
|
||||||
)
|
)
|
||||||
|
|
||||||
case .horizontal(let container):
|
case .horizontal(let container):
|
||||||
TerminalSplitContainer2(
|
TerminalSplitContainer(
|
||||||
direction: .horizontal,
|
direction: .horizontal,
|
||||||
neighbors: .empty,
|
neighbors: .empty,
|
||||||
node: $node,
|
node: $node,
|
||||||
@ -78,7 +78,7 @@ extension Ghostty {
|
|||||||
.onReceive(pubZoom) { onZoom(notification: $0) }
|
.onReceive(pubZoom) { onZoom(notification: $0) }
|
||||||
|
|
||||||
case .vertical(let container):
|
case .vertical(let container):
|
||||||
TerminalSplitContainer2(
|
TerminalSplitContainer(
|
||||||
direction: .vertical,
|
direction: .vertical,
|
||||||
neighbors: .empty,
|
neighbors: .empty,
|
||||||
node: $node,
|
node: $node,
|
||||||
@ -147,7 +147,7 @@ extension Ghostty {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// A noSplit leaf node of a split tree.
|
/// A noSplit leaf node of a split tree.
|
||||||
private struct TerminalSplitLeaf2: View {
|
private struct TerminalSplitLeaf: View {
|
||||||
/// The leaf to draw the surface for.
|
/// The leaf to draw the surface for.
|
||||||
let leaf: SplitNode.Leaf
|
let leaf: SplitNode.Leaf
|
||||||
|
|
||||||
@ -261,7 +261,7 @@ extension Ghostty {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// This represents a split view that is in the horizontal or vertical split state.
|
/// This represents a split view that is in the horizontal or vertical split state.
|
||||||
private struct TerminalSplitContainer2: View {
|
private struct TerminalSplitContainer: View {
|
||||||
let direction: SplitViewDirection
|
let direction: SplitViewDirection
|
||||||
let neighbors: SplitNode.Neighbors
|
let neighbors: SplitNode.Neighbors
|
||||||
@Binding var node: SplitNode?
|
@Binding var node: SplitNode?
|
||||||
@ -271,7 +271,7 @@ extension Ghostty {
|
|||||||
SplitView(direction, left: {
|
SplitView(direction, left: {
|
||||||
let neighborKey: WritableKeyPath<SplitNode.Neighbors, SplitNode?> = direction == .horizontal ? \.right : \.bottom
|
let neighborKey: WritableKeyPath<SplitNode.Neighbors, SplitNode?> = direction == .horizontal ? \.right : \.bottom
|
||||||
|
|
||||||
TerminalSplitNested2(
|
TerminalSplitNested(
|
||||||
node: closeableTopLeft(),
|
node: closeableTopLeft(),
|
||||||
neighbors: neighbors.update([
|
neighbors: neighbors.update([
|
||||||
neighborKey: container.bottomRight,
|
neighborKey: container.bottomRight,
|
||||||
@ -281,7 +281,7 @@ extension Ghostty {
|
|||||||
}, right: {
|
}, right: {
|
||||||
let neighborKey: WritableKeyPath<SplitNode.Neighbors, SplitNode?> = direction == .horizontal ? \.left : \.top
|
let neighborKey: WritableKeyPath<SplitNode.Neighbors, SplitNode?> = direction == .horizontal ? \.left : \.top
|
||||||
|
|
||||||
TerminalSplitNested2(
|
TerminalSplitNested(
|
||||||
node: closeableBottomRight(),
|
node: closeableBottomRight(),
|
||||||
neighbors: neighbors.update([
|
neighbors: neighbors.update([
|
||||||
neighborKey: container.topLeft,
|
neighborKey: container.topLeft,
|
||||||
@ -329,7 +329,7 @@ extension Ghostty {
|
|||||||
|
|
||||||
/// This is like TerminalSplitRoot, but... not the root. This renders a SplitNode in any state but
|
/// This is like TerminalSplitRoot, but... not the root. This renders a SplitNode in any state but
|
||||||
/// requires there be a binding to the parent node.
|
/// requires there be a binding to the parent node.
|
||||||
private struct TerminalSplitNested2: View {
|
private struct TerminalSplitNested: View {
|
||||||
@Binding var node: SplitNode?
|
@Binding var node: SplitNode?
|
||||||
let neighbors: SplitNode.Neighbors
|
let neighbors: SplitNode.Neighbors
|
||||||
|
|
||||||
@ -339,14 +339,14 @@ extension Ghostty {
|
|||||||
Color(.clear)
|
Color(.clear)
|
||||||
|
|
||||||
case .noSplit(let leaf):
|
case .noSplit(let leaf):
|
||||||
TerminalSplitLeaf2(
|
TerminalSplitLeaf(
|
||||||
leaf: leaf,
|
leaf: leaf,
|
||||||
neighbors: neighbors,
|
neighbors: neighbors,
|
||||||
node: $node
|
node: $node
|
||||||
)
|
)
|
||||||
|
|
||||||
case .horizontal(let container):
|
case .horizontal(let container):
|
||||||
TerminalSplitContainer2(
|
TerminalSplitContainer(
|
||||||
direction: .horizontal,
|
direction: .horizontal,
|
||||||
neighbors: neighbors,
|
neighbors: neighbors,
|
||||||
node: $node,
|
node: $node,
|
||||||
@ -354,7 +354,7 @@ extension Ghostty {
|
|||||||
)
|
)
|
||||||
|
|
||||||
case .vertical(let container):
|
case .vertical(let container):
|
||||||
TerminalSplitContainer2(
|
TerminalSplitContainer(
|
||||||
direction: .vertical,
|
direction: .vertical,
|
||||||
neighbors: neighbors,
|
neighbors: neighbors,
|
||||||
node: $node,
|
node: $node,
|
||||||
|
Reference in New Issue
Block a user