macos: invalidate restorable state whenever a terminal window is closed

This commit is contained in:
Mitchell Hashimoto
2024-01-10 21:28:49 -08:00
parent 837b551a92
commit 8b0d4312ee

View File

@ -190,6 +190,11 @@ class TerminalManager {
let frame = focusedWindow.frame
Self.lastCascadePoint = NSPoint(x: frame.minX, y: frame.maxY)
}
// I don't think we strictly have to do this but if a window is
// closed I want to make sure that the app state is invalided so
// we don't reopen closed windows.
NSApplication.shared.invalidateRestorableState()
}
/// Close all windows, asking for confirmation if necessary.