     @subscribe @editor, 'scroll-top-changed.minimap', @updateScroll
     #@subscribe @editor, 'scroll-left-changed.minimap', @updateScroll
 
+  # See /Applications/Atom.app/Contents/Resources/app/src/pane-view.js#349
+  # pane-view's private api
+  # `paneView.activeView` and `paneView.activeItem`
   getEditorView: -> @paneView.viewForItem(@activeItem)
 
   getEditorViewClientRect: -> @scrollView[0].getBoundingClientRect()
 
   getScrollViewClientRect: -> @scrollViewLines[0].getBoundingClientRect()
+
+  # See https://atom.io/docs/api/v0.83.0/api/classes/Pane.html#getActiveEditor-instance
+  # Returns an Editor if the pane item is an Editor, or null otherwise.
+  getEditor: -> @paneView.model.getActiveEditor()
 
   setMinimapEditorView: ->
     # update minimap-editor

  # OTHER PRIVATE METHODS

  activeTabSupportMinimap: ->
    editorView = @getEditorView()

    editorView? and editorView.hasClass('editor')

  scale: (x=1,y=1) -> "scale(#{x}, #{y}) "
  translateY: (y=0) -> "translate3d(0, #{y}px, 0)"


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

    if @activeTabSupportMinimap()
