       @setLoading()
       @error.text(message).show()
 
-  # Public:
+  # Public: Set the loading message to display.
+  #
+  # * message: The loading message.
   setLoading: (message='') ->
     if message.length is 0
       @loading.text("")

  inputThrottle: 50
  cancelling: false

  # Public:
  initialize: ->
    @miniEditor.getBuffer().on 'changed', => @schedulePopulateList()
    @miniEditor.hiddenInput.on 'focusout', => @cancel() unless @cancelling

    item = @list.find('li:first') unless item.length
    @selectItem(item)

  # Private:
  selectItem: (item) ->
    return unless item.length
    @list.find('.selected').removeClass('selected')
    item.addClass 'selected'
    @scrollToItem(item)

  # Private:
  scrollToItem: (item) ->
    scrollTop = @list.scrollTop()
    desiredTop = item.position().top + scrollTop
