mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
tools/magit: reuse magit-status window
Instead of opening the same buffer in a new window.
This commit is contained in:
@ -10,6 +10,9 @@
|
|||||||
(let ((buffer-mode (buffer-local-value 'major-mode buffer)))
|
(let ((buffer-mode (buffer-local-value 'major-mode buffer)))
|
||||||
(display-buffer
|
(display-buffer
|
||||||
buffer (cond
|
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
|
;; Any magit buffers opened from a commit window should open below
|
||||||
;; it. Also open magit process windows below.
|
;; it. Also open magit process windows below.
|
||||||
((or (bound-and-true-p git-commit-mode)
|
((or (bound-and-true-p git-commit-mode)
|
||||||
|
Reference in New Issue
Block a user