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

{$} = require 'atom'
{Subscriber, Emitter} = require 'emissary'

module.exports =
class MinimapGitDiffBinding

    @unsubscribeFromBuffer()

    if @buffer = @editor.getBuffer()
      @subscriptions.add @buffer.onDidStopChanging @updateDiffs
