     @history.dump direction
 
   deactivate: ->
-    @subscriptions.dispose()
-    for key, disposables in @editorSubscriptions
+    for editorID, disposables of @editorSubscriptions
       disposables.dispose()
     @editorSubscriptions = null
+    @subscriptions.dispose()
     settings.dispose()
     @history?.destroy()
     @history = null

      @rowDeltaToRemember = newValue

    atom.commands.add 'atom-workspace',
      'cursor-history:next':  => @next()
      'cursor-history:prev':  => @prev()
      'cursor-history:clear': => @clear()
      'cursor-history:dump':  => @dump()
      'cursor-history:toggle-debug': => @toggleConfig('debug')

    @subscriptions.add atom.workspace.observeTextEditors (editor) =>

      options =
        searchAllPanes: settings.get('searchAllPanes')

      atom.workspace.open(URI, options).done (editor) =>
        editor.scrollToBufferPosition(point, center: true)
        editor.setCursorBufferPosition(point)
