ui/doom-dashboard: fix string/function pwd-policy when last-cwd is blank
This commit is contained in:
parent
bf681f37b7
commit
54001de36e
1 changed files with 5 additions and 5 deletions
|
@ -170,6 +170,10 @@ whose dimensions may not be fully initialized by the time this is run."
|
||||||
(policy +doom-dashboard-pwd-policy))
|
(policy +doom-dashboard-pwd-policy))
|
||||||
(cond ((null policy)
|
(cond ((null policy)
|
||||||
default-directory)
|
default-directory)
|
||||||
|
((stringp policy)
|
||||||
|
(expand-file-name policy lastcwd))
|
||||||
|
((functionp policy)
|
||||||
|
(funcall policy lastcwd))
|
||||||
((null lastcwd)
|
((null lastcwd)
|
||||||
default-directory)
|
default-directory)
|
||||||
((eq policy 'last-project)
|
((eq policy 'last-project)
|
||||||
|
@ -180,13 +184,9 @@ whose dimensions may not be fully initialized by the time this is run."
|
||||||
cwd)))
|
cwd)))
|
||||||
((eq policy 'last)
|
((eq policy 'last)
|
||||||
lastcwd)
|
lastcwd)
|
||||||
((stringp policy)
|
|
||||||
(expand-file-name policy lastcwd))
|
|
||||||
((functionp policy)
|
|
||||||
(funcall policy lastcwd))
|
|
||||||
(t
|
(t
|
||||||
(warn "`+doom-dashboard-pwd-policy' has an invalid value of '%s'"
|
(warn "`+doom-dashboard-pwd-policy' has an invalid value of '%s'"
|
||||||
+doom-dashboard-pwd-policy)))))
|
policy)))))
|
||||||
|
|
||||||
;; widgets
|
;; widgets
|
||||||
(defun doom-dashboard-widget--banner ()
|
(defun doom-dashboard-widget--banner ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue