macOS: move the restoration logs

This commit is contained in:
Lukas
2026-04-25 19:55:28 +02:00
parent 72c03e7fb8
commit 231f6f4c75
2 changed files with 8 additions and 2 deletions

View File

@@ -859,8 +859,6 @@ class AppDelegate: NSObject,
}
func application(_ app: NSApplication, willEncodeRestorableState coder: NSCoder) {
Self.logger.debug("application will save window state")
guard ghostty.config.windowSaveState != "never" else { return }
// Encode our quick terminal state if we have it.

View File

@@ -21,6 +21,12 @@ extension TerminalRestorable {
static var selfKey: String { "state" }
static var versionKey: String { "version" }
private var debugDescription: String {
withUnsafePointer(to: self) { ptr in
"<\(ptr)>[version: \(Self.version)]"
}
}
/// Default implementation returns nil (no custom base config).
var baseConfig: Ghostty.SurfaceConfiguration? { nil }
@@ -45,6 +51,8 @@ extension TerminalRestorable {
func encode(with coder: NSCoder) {
coder.encode(Self.version, forKey: Self.versionKey)
coder.encode(CodableBridge(self), forKey: Self.selfKey)
AppDelegate.logger.debug("saved terminal state: \(debugDescription)")
}
}