   selectItem: (item) ->
     if (row = @getRowForItem(item)) >= 0
       @selectItemForRow(row)
+
+  hasItems: ->
+    @items.length > 1 # ignore prompt placeholder item
 
   selectItemForRow: (row) ->
     item = @items[row]

      if @isActive()
        @selectItemForRow(@findRowForNormalItem(0, 'next'))
      @setModifiedState(false)
      @emitDidRefresh()
      @emitDidStopRefreshing()


  preview: ->
    @preventSyncToEditor = true
    item = @getSelectedItem()
    unless item
      @preventSyncToEditor = false
      @rowMarker?.destroy()
      return

    @provider.openFileForItem(item).then (editor) =>
      editor.scrollToBufferPosition(item.point, center: true)
      @setRowMarker(editor, item.point)
