mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
completion/ivy: don't pre-fill ag/rg/pt/grep searches w/ last search
This commit is contained in:
@ -202,7 +202,6 @@ search current file. See `+ivy-task-tags' to customize what this searches for."
|
|||||||
;; File searching
|
;; File searching
|
||||||
;;
|
;;
|
||||||
|
|
||||||
(defvar +ivy--file-last-search nil)
|
|
||||||
(defvar +ivy--file-search-recursion-p t)
|
(defvar +ivy--file-search-recursion-p t)
|
||||||
(defvar +ivy--file-search-all-files-p nil)
|
(defvar +ivy--file-search-all-files-p nil)
|
||||||
|
|
||||||
@ -220,8 +219,7 @@ search current file. See `+ivy-task-tags' to customize what this searches for."
|
|||||||
(let ((beg (or (bound-and-true-p evil-visual-beginning) (region-beginning)))
|
(let ((beg (or (bound-and-true-p evil-visual-beginning) (region-beginning)))
|
||||||
(end (or (bound-and-true-p evil-visual-end) (region-end))))
|
(end (or (bound-and-true-p evil-visual-end) (region-end))))
|
||||||
(when (> (abs (- end beg)) 1)
|
(when (> (abs (- end beg)) 1)
|
||||||
(rxt-quote-pcre (buffer-substring-no-properties beg end)))))
|
(rxt-quote-pcre (buffer-substring-no-properties beg end)))))))
|
||||||
+ivy--file-last-search))
|
|
||||||
(prompt
|
(prompt
|
||||||
(format "%s%%s %s"
|
(format "%s%%s %s"
|
||||||
(symbol-name engine)
|
(symbol-name engine)
|
||||||
@ -232,7 +230,6 @@ search current file. See `+ivy-task-tags' to customize what this searches for."
|
|||||||
(t
|
(t
|
||||||
(file-relative-name directory project-root)))))
|
(file-relative-name directory project-root)))))
|
||||||
(default-directory directory))
|
(default-directory directory))
|
||||||
(setq +ivy--file-last-search query)
|
|
||||||
(require 'counsel)
|
(require 'counsel)
|
||||||
(cl-letf (((symbol-function 'counsel-ag-function)
|
(cl-letf (((symbol-function 'counsel-ag-function)
|
||||||
(symbol-function '+ivy*counsel-ag-function))
|
(symbol-function '+ivy*counsel-ag-function))
|
||||||
|
Reference in New Issue
Block a user