tools/magit: don't make new windows too tall

Some popups (like logs or revisions) completely consume the current
window.
This commit is contained in:
Henrik Lissner 2018-08-21 22:45:42 +02:00
parent 18a0b059d0
commit 17abb990e4
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -19,9 +19,9 @@
;; magit windows to be visible; especially magit-status). ;; magit windows to be visible; especially magit-status).
((or (bound-and-true-p git-commit-mode) ((or (bound-and-true-p git-commit-mode)
(derived-mode-p 'magit-mode)) (derived-mode-p 'magit-mode))
(let ((size (cond ((eq buffer-mode 'magit-process-mode) 0.35) (let ((size (if (eq buffer-mode 'magit-process-mode)
((bound-and-true-p git-commit-mode) 0.7) 0.35
(0.9)))) 0.7)))
`(display-buffer-below-selected `(display-buffer-below-selected
. ((window-height . ,(truncate (* (window-height) size))))))) . ((window-height . ,(truncate (* (window-height) size)))))))
;; log/stash/process buffers, unless opened from a magit-status ;; log/stash/process buffers, unless opened from a magit-status