mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-01-01 03:02:15 +00:00
macos: isSplit guarding on focus split directions works
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user