 
   deactivate: ->
     @removeDecorations()
+    @subscriptions.dispose()
     @unsubscribe()
     @diffs = null
 
-  scheduleUpdate: -> setImmediate(@updateDiffs)
+  scheduleUpdate: => setImmediate(@updateDiffs)
 
   updateDiffs: =>
     @removeDecorations()

    @decorations = {}
    @markers = null
    @gitDiff = require(@gitDiffPackage.path)

  activate: ->
    @subscribe @editorView, 'editor:path-changed', @subscribeToBuffer
    @subscribe @editorView, 'editor:screen-lines-changed', @renderDiffs
    @subscribe @getRepo(), 'statuses-changed', =>
      @scheduleUpdate()
    @subscribe @getRepo(), 'status-changed', (path) =>
      @scheduleUpdate()

    @subscribeToBuffer()


{$} = require 'atom'
{Subscriber, Emitter} = require 'emissary'
{CompositeDisposable} = require 'event-kit'

module.exports =
class MinimapGitDiffBinding
