branch: elpa/golden-ratio
commit e47c29f87e519f8b8e614a5c0ab7f6429c220a14
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
Trigger after split-window as well
* golden-ratio.el (split-window): New advice.
(golden-ratio): Fixup.
---
golden-ratio.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/golden-ratio.el b/golden-ratio.el
index 8d9dc9c5e1..67970fe91e 100644
--- a/golden-ratio.el
+++ b/golden-ratio.el
@@ -143,8 +143,7 @@ will not cause the window to be resized to the golden
ratio."
(let ((golden-ratio-in-progress t))
(unless (or (window-minibuffer-p)
(one-window-p)
- (member (symbol-name major-mode)
- golden-ratio-exclude-modes)
+ (golden-ratio-exclude-major-mode-p)
(member (buffer-name)
golden-ratio-exclude-buffer-names)
(and golden-ratio-inhibit-functions
@@ -159,6 +158,10 @@ will not cause the window to be resized to the golden
ratio."
(when golden-ratio-mode
(golden-ratio)))
+(defadvice split-window (after golden-ratio-select-window activate)
+ (when golden-ratio-mode
+ (golden-ratio)))
+
;;;###autoload
(define-minor-mode golden-ratio-mode
"Enable automatic window resizing with golden ratio."