Use RootView.eachEditor from Autocomplete package

This commit is contained in:
Kevin Sawicki
2013-01-12 18:03:16 -08:00
parent 01233e2990
commit fc8fb73176

View File

@@ -5,8 +5,8 @@ SelectList = require 'select-list'
module.exports =
class Autocomplete extends SelectList
@activate: (rootView) ->
new Autocomplete(editor) for editor in rootView.getEditors()
rootView.on 'editor:attached', (e, editor) -> new Autocomplete(editor) unless editor.mini
rootView.eachEditor (editor) ->
new Autocomplete(editor) if editor.attached and not editor.mini
@viewClass: -> "autocomplete #{super}"