     @unsubscribeFromBuffer()
 
     if @buffer = @editor.getBuffer()
-      @buffer.on 'contents-modified', @updateDiffs
+      @subscriptions.add @buffer.onDidStopChanging @updateDiffs

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

module.exports =
class MinimapGitDiffBinding

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

  activate: ->
    @getRepo().on 'statuses-changed', @scheduleUpdate
    @getRepo().on 'status-changed', @scheduleUpdate
    @subscriptions.add @editorView.getEditor().onDidChangePath @subscribeToBuffer
    @subscriptions.add @editorView.getEditor().onDidChangeScreenLines @updateDiffs
    # @subscriptions.add @getRepo().onDidChangeStatuses @scheduleUpdate
    # @subscriptions.add @getRepo().onDidChangeStatus @scheduleUpdate

    @subscribeToBuffer()

