     @previewList.hide()
     @previewHeader.hide()
     @errorMessages.hide()
+    @loadingMessage.hide()
     @prompt.iconSize(@miniEditor.getFontSize())
 
     @history = state.history ? []

        @miniEditor.focus()

  toggleLoading: ->
    if @loadingMessage.hasClass 'is-loading'
      @loadingMessage.removeClass 'is-loading'
      @loadingMessage.html ''
      @loadingMessage.hide()
    else
      @loadingMessage.addClass 'is-loading'
      @loadingMessage.html 'Searching...'
      @loadingMessage.show()

  onExpandAll: (event) =>
    @previewList.expandAllPaths()

class CommandPanelView extends View
  @content: ->
    @div class: 'command-panel tool-panel', =>
      @div class: 'loading is-loading', outlet: 'loadingMessage', 'Searching...'
      @div class: 'header', outlet: 'previewHeader', =>
        @ul outlet: 'expandCollapse', class: 'expand-collapse', =>
          @li class: 'expand', 'Expand All'
