ui/doom-dashboard: fix dashboard not updating pwd on kill-buffer
This commit is contained in:
parent
32754a6d07
commit
2ab0072d83
1 changed files with 8 additions and 8 deletions
|
@ -161,14 +161,14 @@ project (which may be different across perspective)."
|
||||||
(defun +doom-dashboard-update-pwd (&optional pwd)
|
(defun +doom-dashboard-update-pwd (&optional pwd)
|
||||||
"Update `default-directory' in the Doom dashboard buffer. What it is set to is
|
"Update `default-directory' in the Doom dashboard buffer. What it is set to is
|
||||||
controlled by `+doom-dashboard-pwd-policy'."
|
controlled by `+doom-dashboard-pwd-policy'."
|
||||||
(with-current-buffer (doom-fallback-buffer)
|
(if pwd
|
||||||
(if pwd
|
(with-current-buffer (doom-fallback-buffer)
|
||||||
(setq-local default-directory pwd)
|
(setq-local default-directory pwd))
|
||||||
(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)
|
(unless (string-suffix-p "/" new-pwd)
|
||||||
(setq new-pwd (concat new-pwd "/")))
|
(setq new-pwd (concat new-pwd "/")))
|
||||||
(setq-local default-directory new-pwd))))))
|
(+doom-dashboard-update-pwd new-pwd)))))
|
||||||
|
|
||||||
(defun +doom-dashboard-reload (&optional force)
|
(defun +doom-dashboard-reload (&optional force)
|
||||||
"Update the DOOM scratch buffer (or create it, if it doesn't exist)."
|
"Update the DOOM scratch buffer (or create it, if it doesn't exist)."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue