Function: diff-hl-next-hunk

diff-hl-next-hunk is an interactive and natively compiled function defined in diff-hl.el.

Signature

(diff-hl-next-hunk &optional BACKWARD)

Documentation

Go to the beginning of the next hunk in the current buffer.

Key Bindings

diff-hl-command-map ] diff-hl-mode-map C-x v ]

Source Code

;; Defined in /nix/store/cfz56rl3lp066226i0bmmgiicls3gcq7-emacs-packages-deps/share/emacs/site-lisp/elpa/diff-hl-20261001.135/diff-hl.el
(defun diff-hl-next-hunk (&optional backward)
  "Go to the beginning of the next hunk in the current buffer."
  (interactive)
  (let ((overlay (diff-hl-search-next-hunk backward)))
    (unless overlay
      (user-error "No further hunks found"))
    (goto-char (overlay-start overlay))
    (when diff-hl-next-previous-hunk-auto-recenter
      (recenter))))