From 23ff93703c2987958145a8c509aa3d16d863ee82 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 5 Jan 2018 14:54:45 -0500 Subject: [PATCH] Append slash to default-directory in doom dashboard ...And give +doom-dashboard-update-pwd a docstring --- modules/ui/doom-dashboard/config.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/ui/doom-dashboard/config.el b/modules/ui/doom-dashboard/config.el index 5353d257e..ea678def2 100644 --- a/modules/ui/doom-dashboard/config.el +++ b/modules/ui/doom-dashboard/config.el @@ -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)