macos: undo close all windows

pull/7535/head
Mitchell Hashimoto 2025-06-06 16:03:20 -07:00
parent d92db73f25
commit aeede903f5
No known key found for this signature in database
GPG Key ID: 523D5DC389D273BC
1 changed files with 5 additions and 1 deletions

View File

@ -710,7 +710,11 @@ class TerminalController: BaseTerminalController {
}
static private func closeAllWindowsImmediately() {
all.forEach { $0.close() }
let undoManager = (NSApp.delegate as? AppDelegate)?.undoManager
undoManager?.beginUndoGrouping()
all.forEach { $0.closeWindowImmediately() }
undoManager?.setActionName("Close All Windows")
undoManager?.endUndoGrouping()
}
// MARK: Undo/Redo