src/vs/workbench/contrib/mergeEditor/browser/model/rangeUtils.ts/lengthBetweenPositions
export function lengthBetweenPositions(position1: Position, position2: Position): LengthObj {
	if (position1.lineNumber === position2.lineNumber) {
		return new LengthObj(0, position2.column - position1.column);
	} else {
		return new LengthObj(position2.lineNumber - position1.lineNumber, position2.column - 1);
	}
}