Emacs: Add purpose-support to magit-workaround.
This commit is contained in:
parent
36c1ab5183
commit
0d6b6a3f86
|
@ -1,6 +1,6 @@
|
|||
;;; git.el --- magit and stuff. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2020-01-27T02:06:44+0100>
|
||||
;; Time-stamp: <2020-01-27T05:28:52+0100>
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
@ -25,16 +25,17 @@
|
|||
(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)))
|
||||
(display-buffer buffer '((display-buffer-pop-up-window
|
||||
display-buffer-use-some-window
|
||||
display-buffer-below-selected)
|
||||
(inhibit-same-window . t)))
|
||||
(magit-display-buffer-traditional buffer)))
|
||||
(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
|
||||
|
|
Loading…
Reference in New Issue
Block a user