ui/doom-dashboard: add deferred reload for new frames
This commit is contained in:
parent
4d20872b35
commit
ede6553959
1 changed files with 6 additions and 0 deletions
|
@ -42,6 +42,7 @@
|
||||||
(setq doom-fallback-buffer +doom-dashboard-name)
|
(setq doom-fallback-buffer +doom-dashboard-name)
|
||||||
|
|
||||||
(add-hook 'emacs-startup-hook '+doom-dashboard/open)
|
(add-hook 'emacs-startup-hook '+doom-dashboard/open)
|
||||||
|
(add-hook 'after-make-frame-functions '+doom-dashboard-deferred-reload)
|
||||||
(add-hook! 'kill-buffer-query-functions
|
(add-hook! 'kill-buffer-query-functions
|
||||||
(if (not (+doom-dashboard-p))
|
(if (not (+doom-dashboard-p))
|
||||||
t
|
t
|
||||||
|
@ -84,6 +85,11 @@
|
||||||
(setq fringe-indicator-alist +doom-dashboard--old-fringe-indicator)
|
(setq fringe-indicator-alist +doom-dashboard--old-fringe-indicator)
|
||||||
(remove-hook 'evil-insert-state-entry-hook 'doom|mode-erase-on-insert t)))
|
(remove-hook 'evil-insert-state-entry-hook 'doom|mode-erase-on-insert t)))
|
||||||
|
|
||||||
|
(defun +doom-dashboard-deferred-reload (&rest _)
|
||||||
|
"Reload the dashboard after a brief pause. This is necessary for new frames,
|
||||||
|
whose dimensions may not be fully initialized by the time this is run."
|
||||||
|
(run-with-timer 0.1 nil '+doom-dashboard-reload))
|
||||||
|
|
||||||
(defun +doom-dashboard-reload (&optional dir)
|
(defun +doom-dashboard-reload (&optional dir)
|
||||||
"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)."
|
||||||
(when (and (not +doom-dashboard-inhibit-refresh)
|
(when (and (not +doom-dashboard-inhibit-refresh)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue