macos: make xcode 14 compatible, do not use switch expr

This commit is contained in:
Mitchell Hashimoto
2023-10-16 20:05:32 -07:00
parent f966a5a163
commit 4341428c18

View File

@ -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)")