   editorView: null
   buffer: null
   suggestionList: null
-  editorSubscription: null
-  bufferSavedSubscription: null
-  bufferChangedSubscription: null
-  editorCursorMovedSubscription: null
+  editorSubscriptions: null
 
   constructor: ->
     @subscriptions = new CompositeDisposable

  # e - The change {Event}
  bufferChanged: (e) =>
    return if @suggestionList.compositionInProgress
    return unless @editorHasFocus()
    if atom.config.get('autocomplete-plus.enableAutoActivation') and (e.newText.trim().length is 1 or e.oldText.trim().length is 1)
      @contentsModified()
    else

    @editorView = atom.views.getView(@editor)
    @buffer = @editor.getBuffer()

    @editorSubscriptions = new CompositeDisposable

    # Subscribe to buffer events:
    @editorSubscriptions.add(@buffer.onDidSave(@bufferSaved))
    @editorSubscriptions.add(@buffer.onDidChange(@bufferChanged))

    # Subscribe to editor events:
    # Close the overlay when the cursor moved without changing any text
    @editorSubscriptions.add(@editor.onDidChangeCursorPosition(@cursorMoved))

  paneItemIsValid: (paneItem) =>
    return false unless paneItem?
