diff --git a/macos/Sources/Features/Splits/SplitTree.swift b/macos/Sources/Features/Splits/SplitTree.swift index a093934d8..c3a4e3097 100644 --- a/macos/Sources/Features/Splits/SplitTree.swift +++ b/macos/Sources/Features/Splits/SplitTree.swift @@ -72,7 +72,12 @@ extension SplitTree { var isEmpty: Bool { root == nil } - + + /// Returns true if this tree is split. + var isSplit: Bool { + if case .split = root { true } else { false } + } + init() { self.init(root: nil, zoomed: nil) } diff --git a/macos/Sources/Ghostty/Ghostty.App.swift b/macos/Sources/Ghostty/Ghostty.App.swift index 95e04fc1e..08c284b04 100644 --- a/macos/Sources/Ghostty/Ghostty.App.swift +++ b/macos/Sources/Ghostty/Ghostty.App.swift @@ -921,8 +921,7 @@ extension Ghostty { // we should only be returning true if we actually performed the action, // but this handles the most common case of caring about goto_split performability // which is the no-split case. - // TODO: fix this - //guard controller.surfaceTree?.isSplit ?? false else { return false } + guard controller.surfaceTree2.isSplit else { return false } NotificationCenter.default.post( name: Notification.ghosttyFocusSplit,