tools/magit: reuse magit-status window

Instead of opening the same buffer in a new window.
This commit is contained in:
Henrik Lissner 2019-07-22 04:01:18 +02:00
parent ea65f82e4d
commit 6b5d65b55b
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -10,6 +10,9 @@
(let ((buffer-mode (buffer-local-value 'major-mode buffer)))
(display-buffer
buffer (cond
((and (eq buffer-mode 'magit-status-mode)
(get-buffer-window buffer))
'(display-buffer-reuse-window))
;; Any magit buffers opened from a commit window should open below
;; it. Also open magit process windows below.
((or (bound-and-true-p git-commit-mode)