From 84550f276aebd9f3673a01c9d7e31494fba278b9 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 2 Jul 2023 12:38:16 -0700 Subject: [PATCH] macos: make close the terminal button non-destructive So that "return" works. --- macos/Sources/Ghostty/Ghostty.SplitView.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/macos/Sources/Ghostty/Ghostty.SplitView.swift b/macos/Sources/Ghostty/Ghostty.SplitView.swift index 6f87922e1..cc0f72487 100644 --- a/macos/Sources/Ghostty/Ghostty.SplitView.swift +++ b/macos/Sources/Ghostty/Ghostty.SplitView.swift @@ -213,6 +213,7 @@ extension Ghostty { let pub = center.publisher(for: Notification.ghosttyNewSplit, object: leaf.surface) let pubClose = center.publisher(for: Notification.ghosttyCloseSurface, object: leaf.surface) let pubFocus = center.publisher(for: Notification.ghosttyFocusSplit, object: leaf.surface) + SurfaceWrapper(surfaceView: leaf.surface) .onReceive(pub) { onNewSplit(notification: $0) } .onReceive(pubClose) { onClose(notification: $0) } @@ -220,7 +221,7 @@ extension Ghostty { .confirmationDialog( "Close Terminal?", isPresented: $confirmClose) { - Button("Close the Terminal", role: .destructive) { + Button("Close the Terminal") { confirmClose = false requestClose = true }