   decorationOptions = {type: 'highlight', class: 'narrow-match'}
   highlight: (editor) ->
     return unless @regexp
-    return unless @needHighlight
     return if isNarrowEditor(editor)
     return if @provider.boundToSingleFile and editor isnt @provider.editor
     return if @markerLayerByEditor.has(editor)

    @lineMarker = editor.markBufferPosition(item.point)
    editor.decorateMarker(@lineMarker, type: 'line', class: 'narrow-line-marker')

  clearCurrentAndLineMarker: ->
    @clearCurrent()
    @clearLineMarker()

  clearLineMarker: ->
    @lineMarker?.destroy()
    @lineMarker = null

  # flash
  # -------------------------
  flashItem: (editor, item) ->
    return unless @needHighlight

    @flashMarker?.destroy()
    clearTimeout(@clearFlashTimeout) if @clearFlashTimeout?

    clearFlashMarker = =>
      @clearFlashTimeout = null
      @flashMarker?.destroy()
      @flashMarker = null

    @flashMarker = editor.markBufferRange(item.range)
    editor.decorateMarker(@flashMarker, type: 'highlight', class: 'narrow-match flash')
    @clearFlashTimeout = setTimeout(clearFlashMarker, 1000)

  refreshAll: ->
    @clear()
    @highlight(editor) for editor in getVisibleEditors()
    @highlightCurrent()

  # Event observation
  # -------------------------
  observeUiPreview: ->
    @ui.onDidPreview ({editor, item}) =>
      @clearCurrentAndLineMarker()
      @highlight(editor)
      @drawLineMarker(editor, item)
      @highlightCurrent()

  observeUiConfirm: ->
    @ui.onDidConfirm ({editor, item}) =>
      @clearCurrentAndLineMarker()

      if decoration = @decorationByItem.get(item)
        updateDecoration(decoration, (cssClass) -> cssClass.replace(' current', ''))

  # line marker
  # -------------------------
  hasLineMarker: ->
    @lineMarker?
