Function: magit-diff-hunk-line
magit-diff-hunk-line is a byte-compiled function defined in
magit-diff.el.
Signature
(magit-diff-hunk-line SECTION GOTO-FROM)
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-diff.el
(defun magit-diff-hunk-line (section goto-from)
(save-excursion
(goto-char (line-beginning-position))
(with-slots (content combined from-ranges from-range to-range) section
(when (or from-range to-range)
(when (< (point) content)
(goto-char content)
(re-search-forward "^[-+]"))
(+ (car (if goto-from from-range to-range))
(let ((prefix (if combined (length from-ranges) 1))
(target (point))
(offset 0))
(goto-char content)
(while (< (point) target)
(unless (string-search
(if goto-from "+" "-")
(buffer-substring (point) (+ (point) prefix)))
(cl-incf offset))
(forward-line))
offset))))))