 
   # Jump to `item.file` at line `item.line`, when an item was selected.
   confirmed: (item) ->
-    GotoView.openItem item
+    @openItem item
     @hide()
 
   # Return to previously focused element when the modal panel is cancelled.
   cancelled: ->
     @hide()
 
-  @openItem: (item) ->
+  openItem: (item) ->
     open(item.file, item.line, {
-      pending: true
+      pending: @pending
     })

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



module.exports =
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
