   registerCommands: ->
     atom.commands.add @editorElement,
       'core:confirm': => @confirm()
-      'narrow-ui:preview-item': => @confirm(preview: true)
+      'narrow-ui:preview-item': => @preview()
       'narrow-ui:toggle-auto-preview': => @toggleAutoPreview()
       # 'core:cancel': => @refresh()
 
   isAutoPreview: -> @autoPreview
-  toggleAutoPreview: -> @autoPreview = not @autoPreview
+  toggleAutoPreview: ->
+    if @autoPreview = not @autoPreview
+      @preview()
 
   getItems: ->
     Promise.resolve(@provider.getItems())

    @clearBlockDecorations()
    query = @getNarrowQuery()
    words = _.compact(query.split(/\s+/))
    filterKey = @provider.getFilterKey()

    @getItems().then (items) =>
      patterns = []
      for word in words
        pattern = _.escapeRegExp(word)
        patterns.push(pattern)

        items = _.filter items, (item) ->
          if filterKey of item
            item[filterKey].match(///#{pattern}///i)
          else
            # When item has no filterKey, it is special, always displayed.
            true

      @updateGrammar(@editor, patterns.join('|'))
      @clearText()
      @setItems(items)
      @updateGutter(@editor.getCursorBufferPosition())

  addBlockDecorationForBufferRow: (row, item) ->
    @blockDecorations ?= []

    buffer.onDidChange ({newRange}) =>
      return unless (newRange.start.row is 0)
      @refresh()

  preview: ->
    @confirm(preview: true)

  confirm: (options={}) ->
    point = @editor.getCursorBufferPosition()
