Function: magit-jump-to-diffstat-or-diff
magit-jump-to-diffstat-or-diff is an interactive and byte-compiled
function defined in magit-diff.el.
Signature
(magit-jump-to-diffstat-or-diff &optional EXPAND)
Documentation
Jump to the diffstat or diff.
When point is on a file inside the diffstat section, then jump to the respective diff section, otherwise jump to the diffstat section or a child thereof.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-diff.el
(defun magit-jump-to-diffstat-or-diff (&optional expand)
"Jump to the diffstat or diff.
When point is on a file inside the diffstat section, then jump
to the respective diff section, otherwise jump to the diffstat
section or a child thereof."
(interactive)
(cond-let
([section (magit-get-section
(append (magit-section-case
([file diffstat] `((file . ,(oref it value))))
(file `((file . ,(oref it value)) (diffstat)))
(hunk `((file . ,(magit-section-parent-value it))
(diffstat)))
(t '((diffstat))))
(magit-section-ident magit-root-section)))]
(goto-char (oref section start))
(when expand
(with-local-quit (magit-section-show section))
(recenter 0)))
((user-error "No diffstat in this buffer"))))