   #
   # name - The identifying {String} name of the plugin.
   unregisterPluginControls: (name) ->
-    atom.config.unobserve "minimap.plugins.#{name}"
-    atom.workspaceView.off "minimap:toggle-#{name}"
+    @pluginsSubscriptions[name].dispose()
+    delete @pluginsSubscriptions[name]
     delete @config.plugins.properties[name]

class PluginManagement extends Mixin
  # Internal: Stores the minimap plugin with their identifying name as key.
  plugins: {}

  # Public: Registers a minimap `plugin` with the given `name`.
  #

  # plugin - The plugin {Object} to register.
  registerPlugin: (name, plugin) ->
    @plugins[name] = plugin
    @pluginsSubscriptions[name] = new CompositeDisposable

    event = {name, plugin}
    @emit('plugin:added', event)
