Closed jsolisu closed 5 years ago
When the package is disabled, the event subscription to ActivePaneItem is not unsubscribed.
// Hook into the events to recognize the user opening new editors or changing the pane const activate = () => { generateConfig(); showState(); fixFile(); atom.workspace.observeTextEditors(observeTextEditor); /* This subscription */ atom.workspace.observeActivePaneItem(observeActivePaneItem); reapplyEditorconfig(); }; // Clean the status-icon up, remove all embedded editorconfig-objects const deactivate = () => { const textEditors = atom.workspace.getTextEditors(); textEditors.forEach(editor => { editor.getBuffer().editorconfig.disposables.dispose(); }); statusTile.removeIcon(); };
Maybe the solution is to use a variable to receive the result of observeActivePaneItem and call dispose() to unsubscribe when package is disabled.
Thanks for reporting @jsolisu - the whole package is under a rewrite. If you can't wait this being fixed, i'd be happy to accept a PR! :)
When the package is disabled, the event subscription to ActivePaneItem is not unsubscribed.
Maybe the solution is to use a variable to receive the result of observeActivePaneItem and call dispose() to unsubscribe when package is disabled.