   focusFindEditor: =>
     selectedText = atom.workspace.getActiveTextEditor()?.getSelectedText?()
     if selectedText and selectedText.indexOf('\n') < 0
-      selectedText = Util.escapeRegex(selectedText) if @findModel.getFindOptions().useRegex
+      selectedText = Util.escapeRegex(selectedText) if @model.getFindOptions().useRegex
       @findEditor.setText(selectedText)
     @findEditor.focus()
     @findEditor.getModel().selectAll()

    @replaceHistory.store()

    if @markers?.length > 0
      unless currentMarker = @findModel.currentResultMarker
        markerIndex = @[nextIndexFn]()
        currentMarker = @markers[markerIndex]

      @findModel.replace([currentMarker], @replaceEditor.getText())
      @[nextOrPreviousFn](fieldToFocus: @replaceEditor)
    else
      atom.beep()

        </symbol>
      </svg>'

  initialize: (@model, {findHistory, replaceHistory}) ->
    @subscriptions = new CompositeDisposable
    @findHistory = new HistoryCycler(@findEditor, findHistory)
    @replaceHistory = new HistoryCycler(@replaceEditor, replaceHistory)
