Skip to content

Commit

Permalink
Trigger after split-window as well
Browse files Browse the repository at this point in the history
* golden-ratio.el (split-window): New advice.
(golden-ratio): Fixup.
  • Loading branch information
abo-abo committed May 1, 2015
1 parent 7215ffc commit e47c29f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions golden-ratio.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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."
Expand Down

0 comments on commit e47c29f

Please sign in to comment.