 
     if @markers?.length > 0
       unless currentMarker = @model.currentResultMarker
-        markerIndex = if _.isFunction(nextIndexFn) then nextIndexFn() else @[nextIndexFn]()
+        markerIndex = @[nextIndexFn]()
         currentMarker = @markers[markerIndex]
 
       @model.replace([currentMarker], @replaceEditor.getText())

      return index if markerStartPosition.isEqual(start) and indexIncluded
      return index if markerStartPosition.isGreaterThan(start)
    0

  selectFirstMarkerBeforeCursor: =>
    markerIndex = @firstMarkerIndexBeforeCursor()

      atom.beep()

  replaceNext: =>
    @replace('findNext', 'firstMarkerIndexFromCursor')

  replacePrevious: =>
    @replace('findPrevious', 'firstMarkerIndexBeforeCursor')
