Append slash to default-directory in doom dashboard
...And give +doom-dashboard-update-pwd a docstring
This commit is contained in:
parent
f277eddf1b
commit
23ff93703c
1 changed files with 4 additions and 1 deletions
|
@ -122,10 +122,13 @@ whose dimensions may not be fully initialized by the time this is run."
|
||||||
(doom-fallback-buffer)))
|
(doom-fallback-buffer)))
|
||||||
|
|
||||||
(defun +doom-dashboard-update-pwd ()
|
(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)
|
(with-current-buffer (doom-fallback-buffer)
|
||||||
(let ((new-pwd (+doom-dashboard--get-pwd)))
|
(let ((new-pwd (+doom-dashboard--get-pwd)))
|
||||||
(when (and new-pwd (file-directory-p new-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)))))
|
(setq default-directory new-pwd)))))
|
||||||
|
|
||||||
(defun +doom-dashboard-reload (&optional force)
|
(defun +doom-dashboard-reload (&optional force)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue