From 4341428c187df539f4107c2da6ef4d55db3fc897 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 16 Oct 2023 20:05:32 -0700 Subject: [PATCH] macos: make xcode 14 compatible, do not use switch expr --- macos/Sources/Ghostty/AppState.swift | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/macos/Sources/Ghostty/AppState.swift b/macos/Sources/Ghostty/AppState.swift index 728f6aa95..43f2a5dbf 100644 --- a/macos/Sources/Ghostty/AppState.swift +++ b/macos/Sources/Ghostty/AppState.swift @@ -276,13 +276,14 @@ extension Ghostty { } func changeFontSize(surface: ghostty_surface_t, _ change: FontSizeModification) { - let action = switch change { + let action: String + switch change { case .increase(let amount): - "increase_font_size:\(amount)" + action = "increase_font_size:\(amount)" case .decrease(let amount): - "decrease_font_size:\(amount)" + action = "decrease_font_size:\(amount)" case .reset: - "reset_font_size" + action = "reset_font_size" } if (!ghostty_surface_binding_action(surface, action, UInt(action.count))) { AppDelegate.logger.warning("action failed action=\(action)")