     firstRow = @getFirstVisibleScreenRow()
     lastRow = @getLastVisibleScreenRow()
 
-    # TODO: for now we don't handle screen changes, simply ask for a full redraw
-    if @pendingChanges.length > 0
-      @offscreenFirstRow = null
-      @pendingChanges = []
-
-    if @offscreenFirstRow?
-      @context.drawImage(@offscreenCanvas, 0, (@offscreenFirstRow-firstRow) * @getLineHeight())
-      if firstRow < @offscreenFirstRow
-        @drawLines(firstRow, @offscreenFirstRow, 0, @context)
-      if lastRow > @offscreenLastRow
-        @drawLines(@offscreenLastRow, lastRow, @offscreenLastRow-firstRow, @context)
+    intactRanges = @computeIntactRanges(firstRow, lastRow)
+    if intactRanges.length is 0
+      @drawLines(@context, firstRow, lastRow, 0)
     else
-      @drawLines(firstRow, lastRow, 0, @context)
+      for intact in intactRanges
+        @copyBitmapPart(@context, @offscreenCanvas, intact.domStart, intact.start-firstRow, intact.end-intact.start)
+      @fillGapsBetweenIntactRanges(@context, intactRanges, firstRow, lastRow)
 
     # copy displayed canvas to offscreen canvas
     @offscreenCanvas.width = @lineCanvas[0].width

      width: canvas.scrollWidth,
      height: @getMinimapHeight()
    }

      @tokenColorCache[flatScopes] = color
    @tokenColorCache[flatScopes]

  drawLines: (context, firstRow, lastRow, offsetRow) ->
    return if firstRow > lastRow
    lines = @editor.linesForScreenRows(firstRow, lastRow)
    lineHeight = @getLineHeight()
    charHeight = @getCharHeight()
