src/vs/workbench/contrib/mergeEditor/browser/model/mapping.ts/DocumentRangeMap/project
class DocumentRangeMap:	public project(position: Position): RangeMapping {
		const lastBefore = findLast(this.rangeMappings, r => r.inputRange.getStartPosition().isBeforeOrEqual(position));
		if (!lastBefore) {
			return new RangeMapping(
				Range.fromPositions(position, position),
				Range.fromPositions(position, position)
			);
		}

		if (rangeContainsPosition(lastBefore.inputRange, position)) {
			return lastBefore;
		}

		const dist = lengthBetweenPositions(lastBefore.inputRange.getEndPosition(), position);
		const outputPos = addLength(lastBefore.outputRange.getEndPosition(), dist);

		return new RangeMapping(
			Range.fromPositions(position),
			Range.fromPositions(outputPos)
		);
	}