From 01b2856cc244ef1ec3f8db7b8349294c2c20bb4a Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 16 Jun 2018 15:20:10 +0200 Subject: [PATCH] From eshell, open magit buffers in same window --- modules/tools/magit/autoload.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/tools/magit/autoload.el b/modules/tools/magit/autoload.el index 99b80631b..b8df2b14a 100644 --- a/modules/tools/magit/autoload.el +++ b/modules/tools/magit/autoload.el @@ -11,6 +11,9 @@ (let ((buffer-mode (buffer-local-value 'major-mode buffer))) (display-buffer 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 ;; full screen. We want to see it all. ((eq (window-dedicated-p) 'side)