     @ignoreChangeOnEditor = false
     range
 
-  bindToEditor: (editor) ->
-    @editorSubcriptions?.dispose()
-    @editorSubcriptions = new CompositeDisposable
-    @editorSubcriptions.add atom.workspace.onDidStopChangingActivePaneItem (item) =>
-      @syncToProviderEditor() if item is editor
-
-    @editorSubcriptions.add editor.onDidStopChanging =>
+  setSyncToEditor: (editor) ->
+    @syncingEditor = editor
+    @syncSubcriptions?.dispose()
+    @syncSubcriptions = new CompositeDisposable
+    @syncSubcriptions.add atom.workspace.onDidStopChangingActivePaneItem (item) =>
+      @syncToEditor() if item is editor
+
+    @syncSubcriptions.add editor.onDidStopChanging =>
       # Skip is not activeEditor, important to skip auto-refresh on direct-edit.
       @refresh(force: true) if isActiveEditor(editor)
 
-    @editorSubcriptions.add editor.onDidChangeCursorPosition (event) =>
+    @syncSubcriptions.add editor.onDidChangeCursorPosition (event) =>
       if isActiveEditor(editor) and
           (not event.textChanged) and
           (event.oldBufferPosition.row isnt event.newBufferPosition.row)
-        @syncToProviderEditor()
+        @syncToEditor()
 
   # vim-mode-plus integration
   # -------------------------


      @preview() if @isAutoPreview()

  syncToProviderEditor: ->
    return if @preventSyncToProviderEditor
    # Detect item
    # - cursor position is equal or greather than that item.
    cursorPosition = @providerEditor.getCursorBufferPosition()
    foundItem = null
    for item in @items by -1 when item.point?.isLessThanOrEqual(cursorPosition)
      foundItem = item

  # -------------------------
  autoPreview: false
  preventAutoPreview: false
  preventSyncToEditor: false
  ignoreChangeOnEditor: false
  destroyed: false
  items: []
