 
 
 module.exports =
-goto: (symbolTableOrPromise) ->
+goto: (symbolTableOrPromise, opts) ->
   @view ?= new GotoView()
+  @view.pending = opts?.pending
 
   # this allows either a promise or a symbolTable as the input
   promise = Promise.resolve symbolTableOrPromise


  # Jump to `item.file` at line `item.line`, when an item was selected.
  confirmed: (item) ->
    GotoView.openItem item
    @hide()

  # Return to previously focused element when the modal panel is cancelled.
  cancelled: ->
    @hide()

  @openItem: (item) ->
    open(item.file, item.line, {
      pending: true
    })

      @view.setError symbolTable.items
      @view.show()
    else if symbolTable.items.length == 1
      @view.openItem symbolTable.items[0]
    else if symbolTable.items.length > 1
      @view.setItems symbolTable.items
      @view.show()
