const prefixLength = r2.replaceRange.start - (firstIntersecting.replaceRange.start + firstEdit1ToEdit2);
if (prefixLength > 0) {
const prefix = firstIntersecting.slice(OffsetRange.emptyAt(newReplaceRangeStart), new OffsetRange(0, prefixLength));
edit.ts
result.push(prefix);
}
if (!lastIntersecting) {
throw new BugIndicatingError(`Invariant violation: lastIntersecting is undefined`);