Make equalize_splits action only affect current window

This commit is contained in:
Bryan Lee
2025-03-04 22:37:32 +08:00
parent ee8ae196ee
commit 423bc1971b
2 changed files with 17 additions and 7 deletions

View File

@@ -50,7 +50,6 @@ extension Ghostty {
var body: some View {
let center = NotificationCenter.default
let pubZoom = center.publisher(for: Notification.didToggleSplitZoom)
let pubEqualize = center.publisher(for: Notification.didEqualizeSplits)
// If we're zoomed, we don't render anything, we are transparent. This
// ensures that the View stays around so we don't lose our state, but
@@ -76,7 +75,6 @@ extension Ghostty {
container: container
)
.onReceive(pubZoom) { onZoom(notification: $0) }
.onReceive(pubEqualize) { onEqualize(notification: $0) }
}
}
.navigationTitle(surfaceTitle ?? "Ghostty")
@@ -137,11 +135,6 @@ extension Ghostty {
}
}
}
func onEqualize(notification: SwiftUI.Notification) {
guard case .split(let c) = node else { return }
_ = c.equalize()
}
}
/// A noSplit leaf node of a split tree.