 
   storeActiveEditor: ->
     @editorView = @getEditorView()
+    @editor = @editorView.getEditor()
 
     @unsubscribeFromEditor()
 
-    @editor = @editorView.getEditor()
     @scrollView = @editorView.scrollView
     @scrollViewLines = @scrollView.find('.lines')
 

    @subscribe @editor, 'scroll-top-changed.minimap', @updateScroll
    #@subscribe @editor, 'scroll-left-changed.minimap', @updateScroll

  getEditorView: -> @paneView.viewForItem(@activeItem)

  getEditorViewClientRect: -> @scrollView[0].getBoundingClientRect()

  getScrollViewClientRect: -> @scrollViewLines[0].getBoundingClientRect()

  setMinimapEditorView: ->
    # update minimap-editor


  onActiveItemChanged: (item) =>
    # Fix called twice when opening minimap!
    return if item is @activeItem
    @activeItem = item

    if @activeTabSupportMinimap()
