       ed = @editor
       edView = atom.views.getView(@editor)
       if not resultEditorRegistry.has ed.id
+        lastRect = null
         resultEditorRegistry.add ed.id
         # create new editor specific result animation method
         listener = -> setTimeout (->

    @decorateMarker()
    @disposables.add @marker.onDidChange (e) => @checkMarker e

  isInViewport: (edRect) ->
    @isVisible = false
    @left = 0
    if @view.parentElement?
      rect = @view.getBoundingClientRect()
      @isVisible = rect.top < edRect.bottom && rect.bottom > edRect.top
      @left = parseInt @view.parentElement.style.left

  updateWidth: (elRect = @editor.editorElement.getBoundingClientRect()) ->
    if @isVisible
      w = elRect.width + elRect.left - 40 - @left
      if w < 100 then w = 100
      @view.style.maxWidth = w + 'px'

  toggleTree: ->
    trees.toggle $(@view).find('> .tree')

            rect = edView.getBoundingClientRect()
            res.forEach (m) -> m.isInViewport(rect)


          # writes
          fastdom.mutate ->
            #if shouldUpdate
            res.forEach (m) -> m.updateWidth(rect)
            last = []

          # batching updates:
          process.nextTick -> requestAnimationFrame listener
          ), 15*1000/60
        window.requestAnimationFrame listener

  initMarker: ->
