       # crappy boolean. Open to suggestions.
       @cursorMoveOriginatedHere = false
     else
-      rootView.getActiveView().trigger('find-and-replace:clear-current-result')
+      @currentEditor().trigger('find-and-replace:clear-current-result')
 
   onSearchModelChanged: (model) =>
     @setOptionButtonState(@regexOptionButton, model.getOption('regex'))

    @active = false
    view.deactivate() for view in @searchResultsViews



  confirmFind: =>
    @search()
    @findNext()
    editor = @currentEditor()
    editor.focus() if editor and editor.searchResults and editor.searchResults.getCurrentResult().total

  confirmReplace: =>
    @search()
