mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-01-10 15:23:35 +00:00
macos: last surface should close tab immediately not window
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user