   serialize: ->
     findHistory: @findHistory.serialize()
     replaceHistory: @replaceHistory.serialize()
-    showFind: @hasParent() and @hasClass('find-mode')
-    showReplace: @hasParent() and @hasClass('replace-mode')
     modelState: @findModel.serialize()
 
   handleEvents: ->

    super()

  toggleFocus: =>
    if @hasClass('replace-mode') and @findEditor.find(':focus').length > 0
      @replaceEditor.focus()
    else
      @findEditor.focus()

    atom.rootView.command 'find-and-replace:replace-all', @replaceAll

  showFind: =>
    @attach() if not @hasParent()
    @findEditor.focus()
    @findEditor.selectAll()

  showReplace: =>
    @attach()
    @replaceEditor.redraw()
    @replaceEditor.focus()
    @replaceEditor.selectAll()
