Have popup manager handle treemacs windows

Other windows would be resized slightly incorrectly because treemacs
opens as a fixed split, rather than a side window. This change forces it
to be a side window, which resolves the problem _and_ restores the
functionality of balance-windows, which is disabled when a fixed split
is present.
This commit is contained in:
Henrik Lissner 2018-07-21 01:20:59 +02:00
parent 7f284e98b6
commit 28e21352ec
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -282,6 +282,14 @@ instead of switch-to-buffer-*."
(set-popup-rule! "\\(^\\*Contents\\|'s annots\\*$\\)" :ignore t))
;; `treemacs'
(after! treemacs
(set-popup-rule! "^ \\*Treemacs" :side 'left :size treemacs-width :quit nil)
(defun +popup*set-popup (&rest _)
(+popup--init (selected-window)))
(advice-add #'treemacs--setup-buffer :after #'+popup*set-popup))
;; `wgrep'
(progn
;; close the popup after you're done with a wgrep buffer