Fix switch-project completion defaulting to current project
Affects doom/browse-in-other-project, doom/find-file-in-other-project, +default/search-other-project and +default/search-project-for-symbol-at-point. When performing a text or file search in "another project", prior to this update the current project would be the first highlighted candidate, which doesn't make much sense when you're invoking a command for searching *other* projects.
This commit is contained in:
parent
8d75d72eb0
commit
77a4e8f8a7
2 changed files with 4 additions and 8 deletions
|
@ -30,8 +30,7 @@ If prefix ARG is set, prompt for a known project to search from."
|
|||
(default-directory
|
||||
(if arg
|
||||
(if-let (projects (projectile-relevant-known-projects))
|
||||
(completing-read "Search project: " projects
|
||||
nil t nil nil (doom-project-root))
|
||||
(completing-read "Search project: " projects nil t)
|
||||
(user-error "There are no known projects"))
|
||||
default-directory)))
|
||||
(call-interactively
|
||||
|
@ -56,8 +55,7 @@ If prefix ARG is set, prompt for a known project to search from."
|
|||
(default-directory
|
||||
(if arg
|
||||
(if-let (projects (projectile-relevant-known-projects))
|
||||
(completing-read "Switch to project: " projects
|
||||
nil t nil nil (doom-project-root))
|
||||
(completing-read "Search project: " projects nil t)
|
||||
(user-error "There are no known projects"))
|
||||
default-directory)))
|
||||
(cond ((featurep! :completion ivy)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue