Variable: magit-status-goto-file-position

magit-status-goto-file-position is a customizable variable defined in magit-status.el.

Value

nil

Documentation

Whether to go to position corresponding to file position.

If this is non-nil and the current buffer is visiting a file, then magit-status tries to go to the position in the status buffer that corresponds to the position in the file-visiting buffer. This jumps into either the diff of unstaged changes or the diff of staged changes.

If the previously current buffer does not visit a file, or if the file has neither unstaged nor staged changes then this has no effect.

The command magit-status-here tries to go to that position, regardless of the value of this option.

This variable was added, or its default value changed, in magit version 3.0.0.

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-status.el
(defcustom magit-status-goto-file-position nil
  "Whether to go to position corresponding to file position.

If this is non-nil and the current buffer is visiting a file,
then `magit-status' tries to go to the position in the status
buffer that corresponds to the position in the file-visiting
buffer.  This jumps into either the diff of unstaged changes
or the diff of staged changes.

If the previously current buffer does not visit a file, or if
the file has neither unstaged nor staged changes then this has
no effect.

The command `magit-status-here' tries to go to that position,
regardless of the value of this option."
  :package-version '(magit . "3.0.0")
  :group 'magit-status
  :type 'boolean)