       else
         context.fillRect(0,y*lineHeight,canvasWidth,lineHeight)
 
+  # Internal: Copy a part of the offscreen bitmap into the onscreen one to
+  # reduce the amount of rendered lines during scroll.
+  #
+  # context - The canvas context object.
+  # bitmapCanvas - The source bitmap.
+  # srcRow - The row {Number} on the source bitmap.
+  # destRow - The row {Number} on the destination bitmap.
+  # rowCount - The {Number} of rows to copy.
   copyBitmapPart: (context, bitmapCanvas, srcRow, destRow, rowCount) ->
     lineHeight = @getLineHeight()
     context.drawImage(bitmapCanvas,


  # Internal: Draws a single token on the given context.
  #
  # context - The canvas context {Object} onto which draw the token.
  # text - The {String} text of the token.
  # color - The {String} color of the token.
  # x - The {Number} position on the x axis at which render the token.


    intactRanges

  # Truncates the intact ranges so that they doesn't expand past the visible
  # area of the minimap.
  #
  # intactRanges - The {Array} of ranges to truncate.
  # firstRow - The first visible row index {Number}.
  # lastRow - The last visible row index {Number}.
  #
  # Returns an {Array} of ranges.
  truncateIntactRanges: (intactRanges, firstRow, lastRow) ->
    i = 0
    while i < intactRanges.length
