mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
fix(default): search commands not respecting default-directory
Commands that delegate to `+default/search-project-for-symbol-at-point` to search a directory (like +default/org-notes-search) would not scope searches to default-directory.
This commit is contained in:
@ -101,18 +101,17 @@ If prefix ARG is set, prompt for a known project to search from."
|
||||
(list (rxt-quote-pcre (or (doom-thing-at-point-or-region) ""))
|
||||
current-prefix-arg))
|
||||
(let* ((projectile-project-root nil)
|
||||
(default-directory
|
||||
(if arg
|
||||
(if-let (projects (projectile-relevant-known-projects))
|
||||
(completing-read "Search project: " projects nil t)
|
||||
(user-error "There are no known projects"))
|
||||
default-directory)))
|
||||
(dir (if arg
|
||||
(if-let (projects (projectile-relevant-known-projects))
|
||||
(completing-read "Search project: " projects nil t)
|
||||
(user-error "There are no known projects"))
|
||||
default-directory)))
|
||||
(cond ((featurep! :completion ivy)
|
||||
(+ivy/project-search nil symbol))
|
||||
(+ivy/project-search nil symbol dir))
|
||||
((featurep! :completion helm)
|
||||
(+helm/project-search nil symbol))
|
||||
(+helm/project-search nil symbol dir))
|
||||
((featurep! :completion vertico)
|
||||
(+vertico/project-search nil symbol))
|
||||
(+vertico/project-search nil symbol dir))
|
||||
((rgrep (regexp-quote symbol))))))
|
||||
|
||||
;;;###autoload
|
||||
|
Reference in New Issue
Block a user