mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
fix(lib): doom-project-find-file: fall back to find-file if DIR is empty
Fix: #7949
This commit is contained in:
@ -155,9 +155,14 @@ If DIR is not a project, it will be indexed (but not cached)."
|
||||
((and (bound-and-true-p helm-mode)
|
||||
(fboundp 'helm-find-files))
|
||||
(call-interactively #'helm-find-files))
|
||||
((when-let ((project-current-directory-override t)
|
||||
(pr (project-current t dir)))
|
||||
(project-find-file-in nil nil pr)))
|
||||
((when-let* ((project-current-directory-override t)
|
||||
(pr (project-current t dir)))
|
||||
(condition-case _
|
||||
(project-find-file-in nil nil pr)
|
||||
;; FIX: project.el throws errors if DIR is an empty directory,
|
||||
;; which is poor UX.
|
||||
(wrong-type-argument
|
||||
(call-interactively #'find-file)))))
|
||||
((call-interactively #'find-file)))))
|
||||
|
||||
;;;###autoload
|
||||
|
Reference in New Issue
Block a user