Function: majutsu-jump-to-diffstat-or-diff
majutsu-jump-to-diffstat-or-diff is an interactive and natively
compiled function defined in majutsu-diff.el.
Signature
(majutsu-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
majutsu-diff-mode-map j
Source Code
;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-diff.el
(defun majutsu-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 "P")
(cond-let
([section
(magit-get-section
(append
(magit-section-case
([jj-file diffstat] `((jj-file . ,(oref it value)) (diff-root)))
(jj-file `((jj-file . ,(oref it value)) (diffstat) (diff-root)))
(jj-hunk `((jj-file . ,(magit-section-parent-value it))
(diffstat) (diff-root)))
(t '((diffstat) (diff-root))))
(magit-section-ident magit-root-section)))]
(goto-char (oref section start))
(when expand
(with-local-quit (majutsu-section-show section))
(recenter 0)))
((user-error "No diffstat in this buffer"))))