mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
ui/doom-dashboard: fix string/function pwd-policy when last-cwd is blank
This commit is contained in:
@ -170,6 +170,10 @@ whose dimensions may not be fully initialized by the time this is run."
|
||||
(policy +doom-dashboard-pwd-policy))
|
||||
(cond ((null policy)
|
||||
default-directory)
|
||||
((stringp policy)
|
||||
(expand-file-name policy lastcwd))
|
||||
((functionp policy)
|
||||
(funcall policy lastcwd))
|
||||
((null lastcwd)
|
||||
default-directory)
|
||||
((eq policy 'last-project)
|
||||
@ -180,13 +184,9 @@ whose dimensions may not be fully initialized by the time this is run."
|
||||
cwd)))
|
||||
((eq policy 'last)
|
||||
lastcwd)
|
||||
((stringp policy)
|
||||
(expand-file-name policy lastcwd))
|
||||
((functionp policy)
|
||||
(funcall policy lastcwd))
|
||||
(t
|
||||
(warn "`+doom-dashboard-pwd-policy' has an invalid value of '%s'"
|
||||
+doom-dashboard-pwd-policy)))))
|
||||
policy)))))
|
||||
|
||||
;; widgets
|
||||
(defun doom-dashboard-widget--banner ()
|
||||
|
Reference in New Issue
Block a user