fix(lib): doom-project-find-file: fall back to find-file if DIR is empty
Fix: #7949
This commit is contained in:
parent
fb0402e89c
commit
bd728fd2a8
1 changed files with 8 additions and 3 deletions
|
@ -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)
|
||||
((when-let* ((project-current-directory-override t)
|
||||
(pr (project-current t dir)))
|
||||
(project-find-file-in nil nil pr)))
|
||||
(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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue