Skip to content

Commit

Permalink
Expose an invalidation API for TextViewHighlighter
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmassicotte committed May 11, 2023
1 parent 52c58b4 commit 4bc0fe4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/Neon/TextViewHighlighter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ public final class TextViewHighlighter: NSObject {
self.highlighter.invalidate(.set(set))
}
}

/// Perform manual invalidation on the underlying highlighter
public func invalidate(_ target: TextTarget = .all) {
highlighter.invalidate()
}
}

@available(macOS 11.0, iOS 15.0, tvOS 15.0, *)
Expand Down

0 comments on commit 4bc0fe4

Please sign in to comment.