branch: externals/olivetti
commit 3facf2b568dec20e849678859b000cae58a45e35
Author: Paul Rankin <[email protected]>
Commit: Paul Rankin <[email protected]>
Change hooks:
- post-command-hook
- window-size-change-functions
---
olivetti.el | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/olivetti.el b/olivetti.el
index 8c62b5e..1af0d6b 100644
--- a/olivetti.el
+++ b/olivetti.el
@@ -374,10 +374,8 @@ hidden."
:lighter olivetti-lighter
(if olivetti-mode
(progn
- (dolist (hook '(window-configuration-change-hook
- window-size-change-functions
- after-setting-font-hook
- text-scale-mode-hook))
+ (dolist (hook '(post-command-hook
+ window-size-change-functions))
(add-hook hook 'olivetti-set-environment t t))
(add-hook 'change-major-mode-hook
'olivetti-reset-all-windows nil t)
@@ -386,10 +384,8 @@ hidden."
(setq olivetti--visual-line-mode visual-line-mode)
(unless olivetti--visual-line-mode (visual-line-mode 1))
(olivetti-set-environment))
- (dolist (hook '(window-configuration-change-hook
- window-size-change-functions
- after-setting-font-hook
- text-scale-mode-hook))
+ (dolist (hook '(post-command-hook
+ window-size-change-functions))
(remove-hook hook 'olivetti-set-environment t))
(olivetti-reset-all-windows)
(olivetti-set-mode-line 'exit)