mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-26 06:48:33 +00:00
macOS: move the restoration logs
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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)")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user