Merge pull request #1915 from ghostty-org/macos-merge

macos: relabel tabs when mergeAllWindows is called
This commit is contained in:
Mitchell Hashimoto
2024-07-02 14:14:33 -07:00
committed by GitHub

View File

@ -169,6 +169,16 @@ class TerminalWindow: NSWindow {
}
}
override func mergeAllWindows(_ sender: Any?) {
super.mergeAllWindows(sender)
if let controller = self.windowController as? TerminalController {
// It takes an event loop cycle to merge all the windows so we set a
// short timer to relabel the tabs (issue #1902)
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { controller.relabelTabs() }
}
}
// MARK: - Tab Bar Styling
// This is true if we should apply styles to the titlebar or tab bar.