From f16aa539c79ba79360c0fb3ba658ecddb038cd83 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 18 May 2018 22:04:59 +0200 Subject: [PATCH] Fix window is not a live frame error #596 --- core/core-ui.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index 055d42966..bf0bb9439 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -587,13 +587,13 @@ frame's window-system, the theme will be reloaded.") ;; line numbers in most modes (add-hook! (prog-mode text-mode conf-mode) #'doom|enable-line-numbers) -(after! whitespace - (defun doom*fix-whitespace-mode-in-childframes (orig-fn &rest args) - (with-selected-frame (apply orig-fn args) +(defun doom*fix-whitespace-mode-in-childframes (orig-fn &rest args) + (let ((frame (apply orig-fn args))) + (with-selected-frame frame (setq-local whitespace-style nil) - (selected-window))) - (advice-add #'company-box--make-frame :around #'doom*fix-whitespace-mode-in-childframes) - (advice-add #'posframe--create-posframe :around #'doom*fix-whitespace-mode-in-childframes)) + frame))) +(advice-add #'company-box--make-frame :around #'doom*fix-whitespace-mode-in-childframes) +(advice-add #'posframe--create-posframe :around #'doom*fix-whitespace-mode-in-childframes) ;; ensure posframe cleans up after itself (after! posframe