From 2c0176718c5fdd66c64f8ed9511b305c2c2a8e9d Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Fri, 31 Oct 2014 00:26:58 -0400 Subject: [PATCH] Disable golden-ratio for guide-key buffer --- spacemacs/packages.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/spacemacs/packages.el b/spacemacs/packages.el index 1ed832f3f..0a881bda9 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -1153,6 +1153,18 @@ DELETE-FUNC when calling CALLBACK. ess-eval-buffer-and-go ess-eval-function-and-go ess-eval-line-and-go))) + + ;; Disable auto-resizing for some buffers + (defun spacemacs/no-golden-ratio-for-buffers (bufname) + "Disable golden-ratio if BUFNAME is the name of a visible buffer." + (and (get-buffer bufname) (get-buffer-window bufname 'visible))) + (defun spacemacs/no-golden-ratio-guide-key () + "Disable golden-ratio for guide-key popwin buffer." + (or (spacemacs/no-golden-ratio-for-buffers " *guide-key*") + (spacemacs/no-golden-ratio-for-buffers " *popwin-dummy*"))) + (add-to-list 'golden-ratio-inhibit-functions + 'spacemacs/no-golden-ratio-guide-key) + (spacemacs//diminish golden-ratio-mode " ⊞")))) (defun spacemacs/init-google-translate ()