     @attr 'data-theme': this.configs.theme
 
   onActiveItemChanged: (item) =>
-    # Fix called twice when open minimap!
+    # Fix called twice when opening minimap!
     return if @activeItem == item
     @activeItem = item
     @getActiveEditor()
+    @getActiveBuffer()
+    @subscribeBuffer()
     @updateMinimapView()
 
   getActiveEditor: ->

    @miniScrollViewRect = @miniEditorView.getClientRect()

    # reset minimap-overlayer
    @miniOverlayer.css
      width: @scrollViewRect.width
      height: @editorViewRect.height
      '-webkit-transform': @translateY()
      transform: @translateY()

    @transform @miniWrapper[0], @minimapScale


  configs: {}

  constructor: (@paneView) ->
    super
    
    @scaleX = 0.2
    @scaleY = @scaleX * 0.8
    @minimapScale = @scale(@scaleX, @scaleY)

  initialize: ->
    @attach()
