branch: externals/olivetti
commit 06bf86fa6f9b811520626a53de4cba73b9d81338
Author: Paul Rankin <he...@paulwrankin.com>
Commit: Paul Rankin <he...@paulwrankin.com>

    Add hook when changing fonts
---
 olivetti.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/olivetti.el b/olivetti.el
index 0edc10b..b7b9967 100644
--- a/olivetti.el
+++ b/olivetti.el
@@ -168,10 +168,14 @@ hidden."
             (olivetti-set-mode-line))
         (add-hook 'window-configuration-change-hook
                   'olivetti-set-environment nil t)
-        (run-hooks 'window-configuration-change-hook))
+        (add-hook 'after-setting-font-hook
+                  'olivetti-set-environment nil t)
+        (olivetti-set-environment))
     (olivetti-set-mode-line 'exit)
     (set-window-margins nil nil)
     (remove-hook 'window-configuration-change-hook
+                 'olivetti-set-environment t)
+    (remove-hook 'after-setting-font-hook
                  'olivetti-set-environment t)))
 
 (provide 'olivetti)

Reply via email to