mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-21 16:08:24 +03: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:
parent
c03b3fa691
commit
932f2c4603
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user