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

    @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 =>
      # Skip is not activeEditor, important to skip auto-refresh on direct-edit.
      @refresh(force: true) if isActiveEditor(editor)

    @editorSubcriptions.add editor.onDidChangeCursorPosition (event) =>
      if isActiveEditor(editor) and
          (not event.textChanged) and
          (event.oldBufferPosition.row isnt event.newBufferPosition.row)
        @syncToProviderEditor()

  # vim-mode-plus integration
  # -------------------------

    editor.decorateMarker(@rowMarker, type: 'line', class: 'narrow-result')

  preview: ->
    @preventSyncToEditor = true
    @confirm(keepOpen: true).then ({editor, point}) =>
      if editor.isAlive()
        @setRowMarker(editor, point)
        @focus()
        @preventSyncToEditor = false

  isNormalItem: (item) ->
    item? and not item.skip
