Deduplicate s:highlight_current_match logic