mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Use RootView.eachEditor to attach snippet commands
Previously the 'editor:attached' was used which would not fire for editors already attached and so any editors opened before the snippets package was loaded would not have snippets enabled.
This commit is contained in:
@@ -12,7 +12,8 @@ module.exports =
|
||||
activate: ->
|
||||
window.snippets = this
|
||||
@loadAll()
|
||||
rootView.on 'editor:attached', (e, editor) => @enableSnippetsInEditor(editor)
|
||||
rootView.eachEditor (editor) =>
|
||||
@enableSnippetsInEditor(editor) if editor.attached
|
||||
|
||||
deactivate: ->
|
||||
@loadSnippetsTask?.abort()
|
||||
|
||||
Reference in New Issue
Block a user