mirror of
https://github.com/atom/atom.git
synced 2026-02-10 14:45:11 -05:00
After each spec runs, make sure there are no subscriptions on directories (which would leak memory)
This commit is contained in:
@@ -27,6 +27,10 @@ class TreeView extends View
|
||||
@on 'tree-view:open-selected-entry', => @openSelectedEntry()
|
||||
@rootView.on 'active-editor-path-change', => @selectActiveFile()
|
||||
|
||||
deactivate: ->
|
||||
@find('.expanded.directory').each ->
|
||||
$(this).view().unwatchEntries()
|
||||
|
||||
selectActiveFile: ->
|
||||
activeFilePath = @rootView.activeEditor()?.buffer.path
|
||||
@selectEntry(@find(".file[path='#{activeFilePath}']"))
|
||||
|
||||
Reference in New Issue
Block a user