diff --git a/mac/Sources/Byre/MarkdownView.swift b/mac/Sources/Byre/MarkdownView.swift index 60ba638..dafd805 100644 --- a/mac/Sources/Byre/MarkdownView.swift +++ b/mac/Sources/Byre/MarkdownView.swift @@ -681,6 +681,10 @@ private final class FlowTextView: NSTextView { NSCursor.arrow.set() return } + if clickable(event) { + NSCursor.arrow.set() + return + } super.cursorUpdate(with: event) } @@ -689,6 +693,13 @@ private final class FlowTextView: NSTextView { return } super.mouseMoved(with: event) + if clickable(event) { + NSCursor.arrow.set() + } + } + + private func clickable(_ event: NSEvent) -> Bool { + onTap != nil && !link(at: convert(event.locationInWindow, from: nil)) } private func frontmost(_ event: NSEvent) -> Bool {