diff --git a/modules/ui/doom-dashboard/config.el b/modules/ui/doom-dashboard/config.el index 3c3eb5116..017e51d85 100644 --- a/modules/ui/doom-dashboard/config.el +++ b/modules/ui/doom-dashboard/config.el @@ -75,10 +75,12 @@ if in a GUI/non-daemon session." (defun +doom-dashboard|kill-buffer-query-fn () (or (unless (+doom-dashboard-p) - (setq +doom-dashboard--last-cwd default-directory) + (when buffer-file-name + (setq +doom-dashboard--last-cwd default-directory)) t) - (ignore (let (+doom-dashboard-inhibit-refresh) - (ignore-errors (+doom-dashboard-reload)))))) + (ignore + (let (+doom-dashboard-inhibit-refresh) + (ignore-errors (+doom-dashboard-reload)))))) (defun +doom-dashboard|make-frame (frame) "Reload the dashboard after a brief pause. This is necessary for new frames,