     @input.value = ""
     @updateTimer = null
     @completions = []
-    @selection = -1
+    @selection = @initialSelectionValue
     @update(true)
 
   updateSelection: ->


  activate: -> @activateWithCompleter("omni", 100)
  activateWithCurrentUrl: -> @activateWithCompleter("omni", 100, window.location.toString())
  activateTabSelection: -> @activateWithCompleter("tabs", 0)
  activateBookmarks: -> @activateWithCompleter("bookmarks", 0)
  getUI: -> @vomnibarUI



  #
  # Activate the Vomnibox.
  #
  activateWithCompleter: (completerName, refreshInterval, initialQueryValue, selectFirstResult) ->
    completer = @getCompleter(completerName)
    @vomnibarUI = new VomnibarUI() unless @vomnibarUI
    completer.refresh()
    @vomnibarUI.setInitialSelectionValue(if selectFirstResult then 0 else -1)
    @vomnibarUI.setCompleter(completer)
    @vomnibarUI.setRefreshInterval(refreshInterval)
    @vomnibarUI.show()
