Skip to content

Commit

Permalink
fix: reuse minimapElement if already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jan 17, 2021
1 parent defc58c commit 1043a29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ function initSubscriptions () {
subscriptions.add(
atom.workspace.observeTextEditors((textEditor) => {
const minimap = minimapForEditor(textEditor)
const minimapElement = atom.views.getView(minimap)
const minimapElement = minimap.getMinimapElement() || atom.views.getView(minimap)

emitter.emit('did-create-minimap', minimap)
minimapElement.attach()
Expand Down

0 comments on commit 1043a29

Please sign in to comment.