Function: magit-todos--goto-item

magit-todos--goto-item is a natively compiled function defined in magit-todos.el.

Signature

(magit-todos--goto-item ITEM)

Documentation

Move point to ITEM.

Assumes current buffer is ITEM's buffer.

Source Code

;; Defined in /nix/store/xy37aj9089qvbs5clw0qszpi3hrh3mxx-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-todos-20250928.1611/magit-todos.el
(defun magit-todos--goto-item (item)
  "Move point to ITEM.
Assumes current buffer is ITEM's buffer."
  (pcase-let* (((cl-struct magit-todos-item position line column keyword) item))
    (if position
        (goto-char position)
      (goto-char (point-min))
      (forward-line (1- line))
      (if column
          (forward-char column)
        (when (re-search-forward (regexp-quote keyword) (line-end-position) t)
          (goto-char (match-beginning 0)))))))