Function: magit-diff-visit-file--noselect

magit-diff-visit-file--noselect is a byte-compiled function defined in magit-diff.el.

Signature

(magit-diff-visit-file--noselect &optional GOTO-FILE)

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-diff.el
(defun magit-diff-visit-file--noselect (&optional goto-file)
  (pcase-let*
      ((`(,old ,new)  (magit-diff-visit--sides))
       (goto-from     (and (not goto-file) (magit-diff-on-removed-line-p)))
       (goto-file     (or goto-file
                          (equal magit-buffer-diff-typearg "--no-index")))
       (`(,rev ,file) (if goto-from old new))
       (buffer        (magit-find-file-noselect (if goto-file "{worktree}" rev)
                                                file)))
    (list buffer
          (magit-diff-visit--position buffer rev file goto-from goto-file))))