From 923a0a58b69dbe333ed96dfd776ca7b823c8cfde Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 25 Oct 2019 01:26:56 -0400 Subject: [PATCH] tools/flycheck: prevent flycheck popup buffer taking focus When tooltip/childframe is off, long errors can spawn a popup window that, by default, will steal input focus. No more! Reported by @rgrinberg --- modules/tools/flycheck/config.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/tools/flycheck/config.el b/modules/tools/flycheck/config.el index 9394d7a9e..9777a8e5b 100644 --- a/modules/tools/flycheck/config.el +++ b/modules/tools/flycheck/config.el @@ -22,6 +22,11 @@ errors.") ;; Display errors a little quicker (default is 0.9s) (setq flycheck-display-errors-delay 0.25) + ;; Don't commandeer input focus if the error message pops up (happens when + ;; tooltips and childframes are disabled). + (after! flycheck + (set-popup-rule! flycheck-error-message-buffer :select nil)) + (add-hook! 'doom-escape-hook :append (defun +flycheck-buffer-h () "Flycheck buffer on ESC in normal mode."