 
   constructor: (@editorView) ->
     {@editor, @gutter} = @editorView
-    @diffs = {}
+    @decorations = {}
 
     @subscribe @editorView, 'editor:path-changed', @subscribeToBuffer
     @subscribe atom.project.getRepo(), 'statuses-changed', =>
-      @diffs = {}
+      @decorations = {}
       @scheduleUpdate()
     @subscribe atom.project.getRepo(), 'status-changed', (path) =>
-      delete @diffs[path]
       @scheduleUpdate() if path is @editor.getPath()
 
     @subscribeToBuffer()


  unsubscribeFromBuffer: ->
    if @buffer?
      @removeDiffs()
      delete @diffs[@buffer.getPath()] if @buffer.destroyed
      @buffer.off 'contents-modified', @updateDiffs
      @buffer = null


    cursorLineNumber = @editor.getCursorBufferPosition().row + 1
    previousDiffLineNumber = -1
    lastDiffLineNumber = -1
    for {newStart} in @diffs ? []
      if newStart < cursorLineNumber
        previousDiffLineNumber = Math.max(newStart - 1, previousDiffLineNumber)
      lastDiffLineNumber = Math.max(newStart - 1, lastDiffLineNumber)
