S (int index, int oldLine1, int oldLine2, int shift) { int line1 = getLineStart(index); int line2 = getLineEnd(index); DiffUtil.UpdatedLineRange newRange = DiffUtil.updateRangeOnModification(line1, line2, oldLine1, oldLine2, shift); // RangeMarker can be updated in a different way boolean rangeAffected = newRange.damaged || (oldLine2 >= line1 && oldLine1 <= line2); S oldState = rangeAffected ? storeChangeState(index) : null; setLineStart(index, newRange.startLine); setLineEnd(index, newRange.endLine); return oldState; }