macos: Close Terminal Intent

This commit is contained in:
Mitchell Hashimoto
2025-06-19 20:00:24 -07:00
parent 0a27aef508
commit f096675eaf
5 changed files with 88 additions and 37 deletions

View File

@@ -218,19 +218,19 @@ class QuickTerminalController: BaseTerminalController {
}
}
override func closeSurfaceNode(
override func closeSurface(
_ node: SplitTree<Ghostty.SurfaceView>.Node,
withConfirmation: Bool = true
) {
// If this isn't the root then we're dealing with a split closure.
if surfaceTree.root != node {
super.closeSurfaceNode(node, withConfirmation: withConfirmation)
super.closeSurface(node, withConfirmation: withConfirmation)
return
}
// If this isn't a final leaf then we're dealing with a split closure
guard case .leaf(let surface) = node else {
super.closeSurfaceNode(node, withConfirmation: withConfirmation)
super.closeSurface(node, withConfirmation: withConfirmation)
return
}