completion/ivy: don't pre-fill ag/rg/pt/grep searches w/ last search
This commit is contained in:
parent
852193dfc5
commit
55a3aeec9a
1 changed files with 1 additions and 4 deletions
|
@ -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))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue