diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2017-11-08 12:21:37 +0100 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2017-11-09 17:30:52 +0100 |
| commit | cfed6f5be863296bbdae531f1f4c62d2cbab3b39 (patch) | |
| tree | 1b179646c26a7f989a0f33b9da33027dfb383ce3 /lisp/magit-diff.el | |
| parent | b13b0482f81030373ae6ff157df94b8998b3a043 (diff) | |
Bind RET to magit-show-commit on commit messages in rev buffers
Closes #2949.
Diffstat (limited to 'lisp/magit-diff.el')
| -rw-r--r-- | lisp/magit-diff.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el index d0880f1..b184001 100644 --- a/lisp/magit-diff.el +++ b/lisp/magit-diff.el @@ -1868,9 +1868,15 @@ or a ref which is not a branch, then it inserts nothing." (goto-char (point-max)) (insert ?\n)))) +(defvar magit-commit-message-section-map + (let ((map (make-sparse-keymap))) + (define-key map [remap magit-visit-thing] 'magit-show-commit) + map) + "Keymap for `commit-message' sections.") + (defun magit-insert-revision-message (rev) "Insert the commit message into a revision buffer." - (magit-insert-section (message) + (magit-insert-section (commit-message) (let ((beg (point))) (magit-rev-insert-format "%B" rev) (if (= (point) (+ beg 2)) |
