     metrics()
     opts.type ?= 'inline'
     {@type} = opts
+    @emitter = new Emitter
     @disposables = new CompositeDisposable
     opts.fade ?= not Result.removeLines @editor, start, end
     opts.loading ?= not opts.content

# TODO: better scrolling behaviour
{throttle} = require 'underscore-plus'
{$, $$} = require 'atom-space-pen-views'
{CompositeDisposable} = require 'atom'
trees = require '../tree'
views = require '../util/views'
{div, span} = views.tags

    @timeout 200, => @destroy()

  destroy: ->
    @emitter.emit 'destroyed'
    @emitter.dispose()
    @marker.destroy()
    @disposables.dispose()

  onDidDestroy: (f) ->
    @emitter.on 'destroyed', f

  invalidate: ->
    @view.classList.add 'invalid'
