                 (let ((beg (or (bound-and-true-p evil-visual-beginning) (region-beginning)))
                       (end (or (bound-and-true-p evil-visual-end) (region-end))))
                   (when (> (abs (- end beg)) 1)
-                    (rxt-quote-pcre (buffer-substring-no-properties beg end)))))
-              +ivy--file-last-search))
+                    (rxt-quote-pcre (buffer-substring-no-properties beg end)))))))
          (prompt
           (format "%s%%s %s"
                   (symbol-name engine)

;; File searching
;;

(defvar +ivy--file-last-search nil)
(defvar +ivy--file-search-recursion-p t)
(defvar +ivy--file-search-all-files-p nil)


                        (t
                         (file-relative-name directory project-root)))))
         (default-directory directory))
    (require 'counsel)
    (cl-letf (((symbol-function 'counsel-ag-function)
               (symbol-function '+ivy*counsel-ag-function))
