src/vs/workbench/api/common/extHostTypes.ts/rangeComparator
const rangeComparator = (a: vscode.Range | undefined, b: vscode.Range | undefined) => {
	if (a === b) { return true; }
	if (!a || !b) { return false; }
	return a.isEqual(b);
};