From d8105427e27c121d6059164794bf52cc58ec8f24 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 28 Dec 2017 20:04:46 -0500 Subject: [PATCH] ui/doom-dashboard: fix restriction to dashboard buffer --- modules/ui/doom-dashboard/config.el | 43 ++++++++++++++--------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/modules/ui/doom-dashboard/config.el b/modules/ui/doom-dashboard/config.el index 44bba352a..dda12d426 100644 --- a/modules/ui/doom-dashboard/config.el +++ b/modules/ui/doom-dashboard/config.el @@ -148,28 +148,27 @@ whose dimensions may not be fully initialized by the time this is run." (with-current-buffer fallback-buffer (setq default-directory (or (+doom-dashboard--get-pwd) - default-directory))) - (unless +doom-dashboard-inhibit-refresh - (with-silent-modifications - (unless (eq major-mode '+doom-dashboard-mode) - (+doom-dashboard-mode)) - (erase-buffer) - - (let ((+doom-dashboard--height (window-height (get-buffer-window fallback-buffer))) - (lines 1) - content) - (with-temp-buffer - (dolist (widget-name +doom-dashboard-widgets) - (funcall (intern (format "doom-dashboard-widget--%s" widget-name))) - (insert "\n")) - (setq content (buffer-string) - lines (count-lines (point-min) (point-max)))) - (insert (make-string (max 0 (- (/ +doom-dashboard--height 2) - (/ lines 2))) - ?\n) - content)) - (unless (button-at (point)) - (goto-char (next-button (point-min))))))) + default-directory)) + (unless +doom-dashboard-inhibit-refresh + (with-silent-modifications + (unless (eq major-mode '+doom-dashboard-mode) + (+doom-dashboard-mode)) + (erase-buffer) + (let ((+doom-dashboard--height (window-height (get-buffer-window fallback-buffer))) + (lines 1) + content) + (with-temp-buffer + (dolist (widget-name +doom-dashboard-widgets) + (funcall (intern (format "doom-dashboard-widget--%s" widget-name))) + (insert "\n")) + (setq content (buffer-string) + lines (count-lines (point-min) (point-max)))) + (insert (make-string (max 0 (- (/ +doom-dashboard--height 2) + (/ lines 2))) + ?\n) + content)) + (unless (button-at (point)) + (goto-char (next-button (point-min)))))))) ;; Update all dashboard windows (dolist (win (get-buffer-window-list (doom-fallback-buffer) nil t)) (set-window-fringes win 0 0)