mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
macos: always create new window on New Window action
Fixes: https://github.com/mitchellh/ghostty/issues/799
This commit is contained in:
@ -96,6 +96,12 @@ class TerminalManager {
|
|||||||
// Initialize our controller to load the window
|
// Initialize our controller to load the window
|
||||||
let c = TerminalController(ghostty, withBaseConfig: base)
|
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.
|
// Create a listener for when the window is closed so we can remove it.
|
||||||
let pubClose = NotificationCenter.default.publisher(
|
let pubClose = NotificationCenter.default.publisher(
|
||||||
for: NSWindow.willCloseNotification,
|
for: NSWindow.willCloseNotification,
|
||||||
|
Reference in New Issue
Block a user