src/vs/workbench/services/search/common/searchHelpers.ts/getMatchStartEnd
function getMatchStartEnd(match: ITextSearchMatch): { start: number, end: number } {
	const matchRanges = match.ranges;
	const matchStartLine = Array.isArray(matchRanges) ? matchRanges[0].startLineNumber : matchRanges.startLineNumber;
	const matchEndLine = Array.isArray(matchRanges) ? matchRanges[matchRanges.length - 1].endLineNumber : matchRanges.endLineNumber;

	return {
		start: matchStartLine,
		end: matchEndLine
	};
}