From eshell, open magit buffers in same window

This commit is contained in:
Henrik Lissner 2018-06-16 15:20:10 +02:00
parent f8625a62ac
commit 01b2856cc2
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -11,6 +11,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
;; If opened from an eshell window, use the same window.
((derived-mode-p 'eshell-mode)
'(display-buffer-same-window))
;; If opened from a magit window from a popup, open the results ;; If opened from a magit window from a popup, open the results
;; full screen. We want to see it all. ;; full screen. We want to see it all.
((eq (window-dedicated-p) 'side) ((eq (window-dedicated-p) 'side)