mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-15 13:23:42 -05:00
fix(default): search region literally in +default/search-buffer
This commit is contained in:
@@ -26,7 +26,8 @@ If prefix ARG is set, prompt for a directory to search from."
|
|||||||
"Conduct a text search on the current buffer.
|
"Conduct a text search on the current buffer.
|
||||||
If a selection is active, pre-fill the prompt with it."
|
If a selection is active, pre-fill the prompt with it."
|
||||||
(interactive)
|
(interactive)
|
||||||
(cond ((or (featurep! :completion helm) (featurep! :completion ivy))
|
(cond ((or (featurep! :completion helm)
|
||||||
|
(featurep! :completion ivy))
|
||||||
(call-interactively
|
(call-interactively
|
||||||
(if (region-active-p)
|
(if (region-active-p)
|
||||||
#'swiper-isearch-thing-at-point
|
#'swiper-isearch-thing-at-point
|
||||||
@@ -36,7 +37,11 @@ If a selection is active, pre-fill the prompt with it."
|
|||||||
(let ((start (region-beginning))
|
(let ((start (region-beginning))
|
||||||
(end (region-end)))
|
(end (region-end)))
|
||||||
(deactivate-mark)
|
(deactivate-mark)
|
||||||
(consult-line (buffer-substring-no-properties start end)))
|
(consult-line
|
||||||
|
(replace-regexp-in-string
|
||||||
|
" " "\\\\ "
|
||||||
|
(rxt-quote-pcre
|
||||||
|
(buffer-substring-no-properties start end)))))
|
||||||
(call-interactively #'consult-line)))))
|
(call-interactively #'consult-line)))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
|
Reference in New Issue
Block a user