       @show()
 
   viewForItem: (item) ->
-    console.log 'viewForItem #{item}'
-
     index = item.filetext.search /\n/
     content = item.filetext.slice(index, item.filetext.length)
 

    'filetext'

  toggle: ->
    console.log 'toggle'
    if @panel?.isVisible()
      @hide()
    else

      @confirmed(item)
    else
      query = @getFilterQuery()
      @cancel()

  confirmed: (item) ->
    atom.workspace.open(item.filepath)
    @cancel()

  destroy: ->
    @cancel()
    @panel?.destroy()

  show: ->
    @storeFocusedElement()
    @panel ?= atom.workspace.addModalPanel(item: this)
    @panel.show()
