         if start is 0 and start is end
           start = end = 1
 
-        @decorateLines(lines, start, end, 'removed')
+        @decorateLines(start, end, 'removed')
 
       else
         for row in [newStart...newStart + newLines]
           start = displayBuffer.screenRowForBufferRow(row)
           end = displayBuffer.lastScreenRowForBufferRow(row)
-          @decorateLines(lines, start, end, 'modified')
+          @decorateLines(start, end, 'modified')
 
-  decorateLines: (lines, start, end, status) ->
-    return if lines.length < end or lines.len
+  decorateLines: (start, end, status) ->
 
     for row in [start..end]
-      lines[row - 1].className += " git-line-#{status}"
+      @minimapView.addLineClass(row, "git-line-#{status}")
 
   removeDiffs: ->
-    @minimapView?.find('[class*="git-line-"]')
-    .removeClass('git-line-added git-line-removed git-line-modified')
+    @minimapView?.removeAllLineClasses('git-line-added', 'git-line-removed', 'git-line-modified')
 
   destroy: ->
     @deactivate()


    if @buffer = @editor.getBuffer()
      @buffer.on 'contents-modified', @updateDiffs

  subscribeToMinimapView: =>
    @subscribe @minimapView.miniEditorView, 'minimap:updated', =>
      @updateDiffs()

        for row in [newStart...newStart + newLines]
          start = displayBuffer.screenRowForBufferRow(row)
          end = displayBuffer.lastScreenRowForBufferRow(row)
          @decorateLines(start, end, 'added')

      else if newLines is 0 and oldLines > 0
        start = displayBuffer.screenRowForBufferRow(newStart)
