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:
Henrik Lissner 2020-05-26 14:02:06 -04:00
parent 8d75d72eb0
commit 77a4e8f8a7
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 4 additions and 8 deletions

View file

@ -41,8 +41,7 @@ they are absolute."
"Preforms `projectile-find-file' in a known project of your choosing."
(interactive
(list
(completing-read "Find file in project: " (projectile-relevant-known-projects)
nil nil nil nil (doom-project-root))))
(completing-read "Find file in project: " (projectile-relevant-known-projects))))
(unless (file-directory-p project-root)
(error "Project directory '%s' doesn't exist" project-root))
(doom-project-find-file project-root))
@ -52,8 +51,7 @@ they are absolute."
"Preforms `find-file' in a known project of your choosing."
(interactive
(list
(completing-read "Browse in project: " (projectile-relevant-known-projects)
nil nil nil nil (doom-project-root))))
(completing-read "Browse in project: " (projectile-relevant-known-projects))))
(unless (file-directory-p project-root)
(error "Project directory '%s' doesn't exist" project-root))
(doom-project-browse project-root))