 
   @content: ->
     @div tabIndex: -1, class: 'find-and-replace tool-panel panel-bottom', =>
+      @ul outlet: 'errorMessages', class: 'error-messages block'
+      @ul outlet: 'infoMessages', class: 'info-messages block'
+
       @div class: 'find-container block', =>
         @label class: 'text-subtle', 'Find'
 

shell = require 'shell'
{Editor, View} = require 'atom'
FindModel = require './find-model'
FindResultsView = require './find-results-view'
History = require './history'

    @findNext()

  findNext: (focusEditorAfter = true) =>
    @findAndSelectResult(@selectFirstMarkerAfterCursor, focusEditorAfter)

  findPrevious: (focusEditorAfter = true) =>
    @findAndSelectResult(@selectFirstMarkerBeforeCursor, focusEditorAfter)

  findAndSelectResult: (selectFunction, focusEditorAfter = true) =>
    @clearMessages()
    pattern = @findEditor.getText()
    @findModel.update { pattern }

    if @markers.length == 0
      @addInfoMessage("No results found for '#{pattern}'")
      shell.beep()
    else
      selectFunction()
      rootView.focus() if focusEditorAfter

  replaceNext: =>
    @clearMessages()
    pattern = @findEditor.getText()
    @findModel.update { pattern }

    if @markers.length == 0
      @addInfoMessage("No results found for '#{pattern}'")
      shell.beep()
    else
      unless currentMarker = @currentResultMarker
