File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Sources/CodeEditSourceEditor/Find Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -290,7 +290,6 @@ extension FindViewController: FindPanelDelegate {
290290 }
291291
292292 func searchFile( query: String ) {
293- // Don't search if target or emphasizeAPI isn't ready
294293 guard let target = target,
295294 let emphasizeAPI = target. emphasizeAPI else {
296295 findPanel. searchDelegate? . findPanelUpdateMatchCount ( 0 )
@@ -336,6 +335,10 @@ extension FindViewController: FindPanelDelegate {
336335 }
337336 }
338337
338+ /// Finds the index of the nearest emphasised match range relative to the cursor or visible text range.
339+ ///
340+ /// - Parameter matchRanges: An array of `NSRange` representing the emphasised match locations.
341+ /// - Returns: The index of the nearest match in `matchRanges`, or `nil` if no matches are found.
339342 private func getNearestHighlightIndex( matchRanges: borrowing [ NSRange ] ) -> Int ? {
340343 guard !matchRanges. isEmpty,
341344 let textViewController = target as? TextViewController ,
You can’t perform that action at this time.
0 commit comments