From 842583b628538c4eb6232d9e4de8d23a55404016 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 17 Dec 2025 10:25:59 -0800 Subject: [PATCH] macos: fix uikit build --- macos/Sources/Ghostty/SurfaceView_UIKit.swift | 3 +++ macos/Sources/Helpers/Extensions/String+Extension.swift | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/macos/Sources/Ghostty/SurfaceView_UIKit.swift b/macos/Sources/Ghostty/SurfaceView_UIKit.swift index 568a93314..b2e429455 100644 --- a/macos/Sources/Ghostty/SurfaceView_UIKit.swift +++ b/macos/Sources/Ghostty/SurfaceView_UIKit.swift @@ -46,6 +46,9 @@ extension Ghostty { /// True when the surface is in readonly mode. @Published private(set) var readonly: Bool = false + + /// True when the surface should show a highlight effect (e.g., when presented via goto_split). + @Published private(set) var highlighted: Bool = false // Returns sizing information for the surface. This is the raw C // structure because I'm lazy. diff --git a/macos/Sources/Helpers/Extensions/String+Extension.swift b/macos/Sources/Helpers/Extensions/String+Extension.swift index a8d93091a..139a7892c 100644 --- a/macos/Sources/Helpers/Extensions/String+Extension.swift +++ b/macos/Sources/Helpers/Extensions/String+Extension.swift @@ -7,7 +7,7 @@ extension String { return self.prefix(maxLength) + trailing } - #if canImport(AppKit) +#if canImport(AppKit) func temporaryFile(_ filename: String = "temp") -> URL { let url = FileManager.default.temporaryDirectory .appendingPathComponent(filename) @@ -16,7 +16,6 @@ extension String { try? string.write(to: url, atomically: true, encoding: .utf8) return url } - #endif /// Returns the path with the home directory abbreviated as ~. var abbreviatedPath: String { @@ -26,4 +25,5 @@ extension String { } return self } +#endif }