ghostty/macos/Sources/Features/Primary Window/PrimaryWindowController.swift
Thorsten Ball 0597b03fa2 macOS: remove dead code from PrimaryWindowController
I think this is a left-over from the refactor that moved this field to
the `PrimaryWindowManager`.
2023-08-17 07:04:46 +02:00

15 lines
530 B
Swift

import Cocoa
class PrimaryWindowController: NSWindowController {
// This is used to programmatically control tabs.
weak var windowManager: PrimaryWindowManager?
// This is required for the "+" button to show up in the tab bar to add a
// new tab.
override func newWindowForTab(_ sender: Any?) {
guard let window = self.window else { preconditionFailure("Expected window to be loaded") }
guard let manager = self.windowManager else { return }
manager.addNewTab(to: window)
}
}