Variable: make-cursor-line-fully-visible
make-cursor-line-fully-visible is a customizable variable defined in
xdisp.c.
Value
t
Documentation
Whether to scroll the window if the cursor line is not fully visible.
If the value is non-nil, Emacs scrolls or recenters the window to make the cursor line fully visible. The value could also be a function, which is called with a single argument, the window to be scrolled, and should return non-nil if the partially-visible cursor requires scrolling the window, nil if it's okay to leave the cursor partially-visible.
Probably introduced at or before Emacs version 27.1.
Source Code
// Defined in /usr/src/emacs/src/xdisp.c
DEFVAR_LISP ("make-cursor-line-fully-visible", Vmake_cursor_line_fully_visible,
doc: /* Whether to scroll the window if the cursor line is not fully visible.
If the value is non-nil, Emacs scrolls or recenters the window to make
the cursor line fully visible. The value could also be a function, which
is called with a single argument, the window to be scrolled, and should
return non-nil if the partially-visible cursor requires scrolling the
window, nil if it's okay to leave the cursor partially-visible. */);