From: Mark Wooding Date: Mon, 2 May 2022 22:19:10 +0000 (+0100) Subject: el/dot-emacs.el: Override Magit's displaying of file buffers from diffs. X-Git-Url: https://git.distorted.org.uk/~mdw/profile/commitdiff_plain/9f76176c0ed91bb2e6b3f67db86aadb9f4f8985b?hp=b8dc30fe5264a9a5869528aa826884d1ca143b36 el/dot-emacs.el: Override Magit's displaying of file buffers from diffs. --- diff --git a/el/dot-emacs.el b/el/dot-emacs.el index 12c3b21..d7b4800 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -5205,6 +5205,11 @@ rather than baking the list into the function." nil)))) (setq magit-display-buffer-function 'mdw-display-magit-buffer) +(defun mdw-display-magit-file-buffer (buffer) + "Show a file buffer from a diff." + (select-window (display-buffer buffer))) +(setq magit-display-file-buffer-function 'mdw-display-magit-file-buffer) + ;;;-------------------------------------------------------------------------- ;;; GUD, and especially GDB.