roman / golden-ratio.el

Automatic resizing of Emacs windows to the golden ratio
MIT License
589 stars 38 forks source link

golden-ratio doesn't trigger in Magit #77

Open hinrik opened 7 years ago

hinrik commented 7 years ago

When using Magit (and possibly other similar things), there are numerous occasions (when opening Magit, when committing, when viewing the log, etc) when a new window is opened and selected, but golden-ratio is not triggered, so the selected window is quite small.

As a workaround, I've been doing the following. Probably inefficient, but works.

(add-to-list 'window-size-change-functions 'golden-ratio)

dieggsy commented 7 years ago

I was also able to do this with the following advice (using the new advice syntax):

(define-advice select-window (:after (window &optional no-record) golden-ratio-resize-window)
    (golden-ratio)
    nil)