emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/golden-ratio 5e5b6c805b 85/95: Call window-configuration-c


From: ELPA Syncer
Subject: [nongnu] elpa/golden-ratio 5e5b6c805b 85/95: Call window-configuration-change-hook only once, after the golden-ratio command.
Date: Thu, 7 Sep 2023 22:02:16 -0400 (EDT)

branch: elpa/golden-ratio
commit 5e5b6c805b44a2ad36b6ddac74ebcde72681c27a
Author: Constantin Kulikov <zxnotdead@gmail.com>
Commit: Constantin Kulikov <zxnotdead@gmail.com>

    Call window-configuration-change-hook only once, after the golden-ratio 
command.
---
 golden-ratio.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/golden-ratio.el b/golden-ratio.el
index b16441a8c4..728f480b35 100644
--- a/golden-ratio.el
+++ b/golden-ratio.el
@@ -152,10 +152,12 @@ will prevent the window to be resized to the golden 
ratio."
           (golden-ratio-mode nil))
       ;; Always disable `golden-ratio-mode' to avoid
       ;; infinite loop in `balance-windows'.
-      (balance-windows)
-      (golden-ratio--resize-window dims)
-      (when golden-ratio-recenter
-        (scroll-right) (recenter)))))
+      (let (window-configuration-change-hook)
+        (balance-windows)
+        (golden-ratio--resize-window dims)
+        (when golden-ratio-recenter
+          (scroll-right) (recenter)))
+      (run-hooks 'window-configuration-change-hook))))
 
 ;; Should return nil
 (defadvice other-window



reply via email to

[Prev in Thread] Current Thread [Next in Thread]