macos: last surface should close tab immediately not window

This commit is contained in:
Mitchell Hashimoto
2025-12-30 15:00:32 -08:00
parent 3e399a3d35
commit d4ba0fa27e
2 changed files with 2 additions and 2 deletions

View File

@@ -952,7 +952,7 @@ class BaseTerminalController: NSWindowController,
// controller is a TerminalController this is easy because it has a way
// to do this.
if let c = sourceController as? TerminalController {
c.closeWindowImmediately()
c.closeTabImmediately()
} else {
// Not a TerminalController so we always undo into a new window.
_ = TerminalController.newWindow(

View File

@@ -614,7 +614,7 @@ class TerminalController: BaseTerminalController, TabGroupCloseCoordinator.Contr
closeWindow(nil)
}
private func closeTabImmediately(registerRedo: Bool = true) {
func closeTabImmediately(registerRedo: Bool = true) {
guard let window = window else { return }
guard let tabGroup = window.tabGroup,
tabGroup.windows.count > 1 else {