Skip to content

Commit

Permalink
fix: focus lost when closing tab when using stage manager on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexJuca committed Jan 16, 2025
1 parent a185ce3 commit f9f0672
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions macos/Sources/Features/Terminal/BaseTerminalController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,16 @@ class BaseTerminalController: NSWindowController,
self.alert = nil
switch (response) {
case .alertFirstButtonReturn:
if let windows = window.tabGroup?.windows, windows.count > 1 {
let secondLastWindow = windows[windows.count - 2]
secondLastWindow.makeKeyAndOrderFront(nil)
secondLastWindow.makeFirstResponder(nil)

window.close()
}

window.close()


default:
break
Expand Down

0 comments on commit f9f0672

Please sign in to comment.