Function: magit-jump-to-diffstat-or-diff
magit-jump-to-diffstat-or-diff is an interactive and natively 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
magit-diff-mode-map j
Source Code
;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/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"))))