       return @editor = @scrollView = null
 
     @editor = @editorView.getEditor()
-    @scrollView = @editorView.find('.scroll-view')
+    @scrollView = @editorView.scrollView
     @scrollViewLines = @scrollView.find('.lines')
 
     # current editor bind scrollTop event

  configs: {}

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

  initialize: ->
    @attach()

    @attr 'data-theme': this.configs.theme

  onActiveItemChanged: (item) =>
    # Fix called twice when opening minimap!
    return if @activeItem == item
    @activeItem = item
    @getActiveEditor()
    @getActiveBuffer()
    @subscribeBuffer()
    @updateMinimapView()

  getActiveEditor: ->
