Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 4af0a07

Browse files
committed
Properly dispose of text editors subscription
Fixes #156
1 parent 2bc7df4 commit 4af0a07

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/main.coffee

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@ module.exports =
1414
default: true
1515

1616
activate: ->
17-
atom.workspace.observeTextEditors (editor) ->
17+
@editorsSubscription = atom.workspace.observeTextEditors (editor) ->
1818
editorElement = atom.views.getView(editor)
1919

2020
BracketMatcherView ?= require './bracket-matcher-view'
2121
new BracketMatcherView(editor, editorElement)
2222

2323
BracketMatcher ?= require './bracket-matcher'
2424
new BracketMatcher(editor, editorElement)
25+
26+
deactivate: ->
27+
@editorsSubscription.dispose()

0 commit comments

Comments
 (0)