
int currentLastLine = myLastChangedLine + linesShift;
</BUG>
int upToDateFirstLine = getUpToDateLine1(lastRangeBefore, myFirstChangedLine);
<BUG>int upToDateLastLine = getUpToDateLine2(firstRangeAfter, myLastChangedLine, myTotalLines, upToDateTotalLine);
List<Range> newChangedRanges = getNewChangedRanges(currentFirstLine, currentLastLine, upToDateFirstLine, upToDateLastLine);
</BUG>
shiftRanges(rangesAfterChange, linesShift);
if (!changedRanges.equals(newChangedRanges)) {
replaceRanges(changedRanges, newChangedRanges);

myFirstChangedLine = firstChangedRange.getOffset1();
}
if (lastChangedRange != null && lastChangedRange.getOffset2() > myLastChangedLine) {
myLastChangedLine = lastChangedRange.getOffset2() - 1;
}
currentFirstChangedLine = myFirstChangedLine;
currentLastChangedLine = myLastChangedLine + linesShift;
int upToDateFirstLine = getUpToDateLine1(lastRangeBefore, myFirstChangedLine);
int upToDateLastLine = getUpToDateLine2(firstRangeAfter, myLastChangedLine, myTotalLines, upToDateTotalLine);
List<Range> newChangedRanges =
getNewChangedRanges(currentFirstChangedLine, currentLastChangedLine, upToDateFirstLine, upToDateLastLine);
shiftRanges(rangesAfterChange, linesShift);
if (!changedRanges.equals(newChangedRanges)) {
replaceRanges(changedRanges, newChangedRanges);
