                 // highlight
                 highlights += matches.enumerated()
                     .filter { !$0.element.isEmpty }
-                    .map { HighlightItem(range: $0.element, color: highlightColors[$0.offset]) }
+                    .map { ItemRange<NSColor>(item: highlightColors[$0.offset], range: $0.element) }
                 
                 // build TextFindResult for table
                 if showsList {

    var lineNumber: Int
    var attributedLineString: NSAttributedString
    var inlineRange: NSRange
}


private struct HighlightItem {
    
    var range: NSRange
    var color: NSColor
}



                    layoutManager.groupTemporaryAttributesUpdate(in: wholeRange) {
                        layoutManager.removeTemporaryAttribute(.backgroundColor, forCharacterRange: wholeRange)
                        for highlight in highlights {
                            layoutManager.addTemporaryAttribute(.backgroundColor, value: highlight.item, forCharacterRange: highlight.range)
                        }
                    }
                }
