         while intactRange.domStart > domPosition
           currentLine = killLine(currentLine)
           domPosition++
-        for i in [intactRange.from..intactRange.to]
+        for i in [intactRange.start..intactRange.end]
           currentLine = currentLine.nextSibling
           domPosition++
       while currentLine

    currentLine = renderedLines.firstChild
    screenRow = renderFrom
    for row in [renderFrom..renderTo]
      if row == nextIntact?.to + 1
        nextIntact = intactRanges.shift()
      if !nextIntact or row < nextIntact.from
        lineElement = @buildLineElementForScreenRow(row)
        renderedLines.insertBefore(lineElement, currentLine)
      else

    i = 0
    while i < intactRanges.length
      range = intactRanges[i]
      if range.start < renderFrom
        range.domStart += renderFrom - range.start
        range.start = renderFrom
      if range.end > renderTo
        range.end = renderTo
      if range.start >= range.end
        intactRanges.splice(i--, 1)
      i++
    intactRanges.sort (a, b) -> a.domStart - b.domStart
