From 1e4abb8c5e85b6e07c8f8fe3bbdcefade3f4d6f0 Mon Sep 17 00:00:00 2001 From: Matt <85322+mattmassicotte@users.noreply.github.com> Date: Mon, 20 Nov 2023 07:40:36 -0500 Subject: [PATCH] macOS guard --- Sources/TextStory/TextStorageEventRouter.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/TextStory/TextStorageEventRouter.swift b/Sources/TextStory/TextStorageEventRouter.swift index 32a56c8..cfd24c6 100644 --- a/Sources/TextStory/TextStorageEventRouter.swift +++ b/Sources/TextStory/TextStorageEventRouter.swift @@ -53,11 +53,12 @@ extension TextStorageEventRouter: TSYTextStorageDelegate { } } +#if os(macOS) public func textStorage(_ textStorage: TSYTextStorage, doubleClickRangeForLocation location: UInt) -> NSRange { if let provider = doubleClickWordRangeProvider { return provider(Int(location)) } - + return textStorage.internalStorage.doubleClick(at: Int(location)) } @@ -68,4 +69,5 @@ extension TextStorageEventRouter: TSYTextStorageDelegate { return UInt(textStorage.internalStorage.nextWord(from: Int(location), forward: forward)) } +#endif }