diff --git a/lib/main.coffee b/lib/main.coffee index 899d947d..37f1a070 100644 --- a/lib/main.coffee +++ b/lib/main.coffee @@ -223,6 +223,8 @@ class Main # Returns a {Minimap}. minimapForEditor: (textEditor) -> return unless textEditor? + + Minimap ?= require './minimap' @editorsMinimaps ?= new Map minimap = @editorsMinimaps.get(textEditor) @@ -260,8 +262,6 @@ class Main # Internal: Registers initSubscriptions: -> - Minimap ?= require './minimap' - @subscriptions.add atom.workspace.observeTextEditors (textEditor) => minimap = @minimapForEditor(textEditor)