macos: isSplit guarding on focus split directions works

pull/7523/head
Mitchell Hashimoto 2025-06-04 09:28:18 -07:00
parent 0fb58298a7
commit 7dcfebcd5d
No known key found for this signature in database
GPG Key ID: 523D5DC389D273BC
2 changed files with 7 additions and 3 deletions

View File

@ -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)
}

View File

@ -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,