From 636b1fff8a4d0ca43ef1794791ff582dc6a6e111 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 6 Jun 2025 15:56:17 -0700 Subject: [PATCH] macos: initial window shouldn't support undo --- macos/Sources/App/macOS/AppDelegate.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/macos/Sources/App/macOS/AppDelegate.swift b/macos/Sources/App/macOS/AppDelegate.swift index aacf8f651..013e89f58 100644 --- a/macos/Sources/App/macOS/AppDelegate.swift +++ b/macos/Sources/App/macOS/AppDelegate.swift @@ -260,7 +260,9 @@ class AppDelegate: NSObject, // - if we're opening a URL since `application(_:openFile:)` is called before this. // - if we're restoring from persisted state if TerminalController.all.isEmpty && derivedConfig.initialWindow { + undoManager.disableUndoRegistration() _ = TerminalController.newWindow(ghostty) + undoManager.enableUndoRegistration() } } }