macos: always create new window on New Window action

Fixes: https://github.com/mitchellh/ghostty/issues/799
This commit is contained in:
Gregory Anders
2023-11-03 07:34:17 -07:00
parent 4ac48adf03
commit a844613a26

View File

@ -96,6 +96,12 @@ class TerminalManager {
// Initialize our controller to load the window
let c = TerminalController(ghostty, withBaseConfig: base)
// For new windows, explicitly disallow tabbing with other windows.
// This overrides the value of userTabbingPreference. Rationale:
// Ghostty provides separate "New Tab" and "New Window" actions so
// there's no reason to make "New Window" open in a tab.
c.window!.tabbingMode = .disallowed;
// Create a listener for when the window is closed so we can remove it.
let pubClose = NotificationCenter.default.publisher(
for: NSWindow.willCloseNotification,