Function: magit-blame-next-chunk-same-commit

magit-blame-next-chunk-same-commit is an interactive and natively compiled function defined in magit-blame.el.

Signature

(magit-blame-next-chunk-same-commit)

Documentation

Move to the next chunk from the same commit.

Key Bindings

magit-blame-read-only-mode-map N

Source Code

;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/magit-blame.el
(defun magit-blame-next-chunk-same-commit (&optional previous)
  "Move to the next chunk from the same commit.
\n(fn)"
  (interactive)
  (if-let ((rev (oref (magit-current-blame-chunk) orig-rev)))
      (let ((pos (point)) ov)
        (save-excursion
          (while (and (not ov)
                      (not (= pos (if previous (point-min) (point-max))))
                      (setq pos (funcall
                                 (if previous
                                     #'previous-single-char-property-change
                                   #'next-single-char-property-change)
                                 pos 'magit-blame-chunk)))
            (when-let
                ((o (magit-blame--overlay-at pos))
                 (_(equal (oref (magit-blame-chunk-at pos) orig-rev) rev)))
              (setq ov o))))
        (if ov
            (goto-char (overlay-start ov))
          (user-error "No more chunks from same commit")))
    (user-error "This chunk hasn't been blamed yet")))