     top = Math.max(top, 0)
     top = Math.min(top, @miniScrollView.outerHeight() - miniOverLayerHeight)
     # @note: currently, no animation.
-    @editorView.scrollTop(top)
+    @editorView.updateScroll()
     # Fix trigger `mousewheel` event.
     setTimeout =>
       @isClicked = false


    @transform @miniWrapper[0], @minimapScale

    setImmediate =>
      @scrollTop(@editorView.scrollTop())

  reset: -> @transform @miniWrapper[0], @scale()



    # current editor bind scrollTop event
    @editor.off 'scroll-top-changed.editor'
    @editor.on 'scroll-top-changed.editor', @updateScroll
    @editor.off 'scroll-left-changed.editor'
    @editor.on 'scroll-left-changed.editor', @updateScroll

  getActiveBuffer: ->
    @buffer = @editor?.getBuffer?()
