From 42231708aaa9714f3ae3e31fa73f8a88e237ce09 Mon Sep 17 00:00:00 2001 From: James Cherti <60946298+jamescherti@users.noreply.github.com> Date: Mon, 14 Oct 2024 10:03:42 -0400 Subject: [PATCH] Fix artifacts --- early-init.el | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/early-init.el b/early-init.el index 6cd8c3e..92c86c6 100644 --- a/early-init.el +++ b/early-init.el @@ -115,18 +115,21 @@ When set to non-nil, Emacs will automatically call `package-initialize' and (unless noninteractive (unless minimal-emacs-debug - ;; Suppress redisplay and redraw during startup to avoid delays and - ;; prevent flashing an unstyled Emacs frame. - (setq-default inhibit-redisplay t - inhibit-message t) + (unless minimal-emacs-debug + ;; Suppress redisplay and redraw during startup to avoid delays and + ;; prevent flashing an unstyled Emacs frame. + ;; (setq-default inhibit-redisplay t) ; Can cause artifacts + (setq-default inhibit-message t) - ;; Reset the above variables to prevent Emacs from appearing frozen or - ;; visually corrupted after startup or if a startup error occurs. - (defun minimal-emacs--reset-inhibited-vars-h () - (setq-default inhibit-redisplay nil - inhibit-message nil) - (remove-hook 'post-command-hook #'minimal-emacs--reset-inhibited-vars-h)) - (add-hook 'post-command-hook #'minimal-emacs--reset-inhibited-vars-h -100) + ;; Reset the above variables to prevent Emacs from appearing frozen or + ;; visually corrupted after startup or if a startup error occurs. + (defun minimal-emacs--reset-inhibited-vars-h () + ;; (setq-default inhibit-redisplay nil) ; Can cause artifacts + (setq-default inhibit-message nil) + (remove-hook 'post-command-hook #'minimal-emacs--reset-inhibited-vars-h)) + + (add-hook 'post-command-hook + #'minimal-emacs--reset-inhibited-vars-h -100)) (dolist (buf (buffer-list)) (with-current-buffer buf