Append slash to default-directory in doom dashboard

...And give +doom-dashboard-update-pwd a docstring
This commit is contained in:
Henrik Lissner 2018-01-05 14:54:45 -05:00
parent f277eddf1b
commit 23ff93703c
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -122,10 +122,13 @@ whose dimensions may not be fully initialized by the time this is run."
(doom-fallback-buffer)))
(defun +doom-dashboard-update-pwd ()
"TODO"
"Update `default-directory' in the Doom dashboard buffer. What it is set to is
controlled by `+doom-dashboard-pwd-policy'."
(with-current-buffer (doom-fallback-buffer)
(let ((new-pwd (+doom-dashboard--get-pwd)))
(when (and new-pwd (file-directory-p new-pwd))
(unless (string-suffix-p "/" new-pwd)
(setq new-pwd (concat new-pwd "/")))
(setq default-directory new-pwd)))))
(defun +doom-dashboard-reload (&optional force)