Emacs: Remove magit workaround for vertical split.

Seems to be fixed.
This commit is contained in:
tastytea 2020-05-03 04:32:45 +02:00
parent fa9cee2203
commit f282e1c8a0

View File

@ -1,6 +1,6 @@
;;; git.el --- magit and stuff. -*- lexical-binding: t; -*-
;; Time-stamp: <2020-05-03T03:50:37+0200>
;; Time-stamp: <2020-05-03T04:32:34+0200>
;;; Commentary:
@ -21,20 +21,6 @@
:custom
(magit-diff-refine-hunk 'all) ; Show word-granularity differences.
:config
;; <https://github.com/magit/magit/issues/4034>
(defun my/magit-display-buffer (buffer)
"Workaround to ensure that BUFFER is split vertically if necessary."
(if (and git-commit-mode
(with-current-buffer buffer
(derived-mode-p 'magit-diff-mode)))
(purpose--action-function buffer '((display-buffer-pop-up-window
display-buffer-use-some-window
display-buffer-below-selected)
(inhibit-same-window . t))))
(magit-display-buffer-traditional buffer))
(setq magit-display-buffer-function #'my/magit-display-buffer)
:bind
("C-x g" . nil) ; Disable default.
("C-c g" . magit-status)