From 932f2c4603bd6e1d17ca19909a1f3ab2ec8b28a2 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 20 Feb 2013 12:04:17 -0800 Subject: [PATCH] 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. --- src/packages/snippets/lib/snippets.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/packages/snippets/lib/snippets.coffee b/src/packages/snippets/lib/snippets.coffee index 70872a08c..cd8e279d9 100644 --- a/src/packages/snippets/lib/snippets.coffee +++ b/src/packages/snippets/lib/snippets.coffee @@ -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()