[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: centering_position in redisplay_window?
From: |
Eli Zaretskii |
Subject: |
Re: centering_position in redisplay_window? |
Date: |
Wed, 01 Dec 2021 11:01:47 +0200 |
User-agent: |
K-9 Mail for Android |
On December 1, 2021 9:19:14 AM GMT+02:00, Po Lu <luangruo@yahoo.com> wrote:
> Does anyone know what `centering_position' in redisplay_window means?
> Is it some kind of row number that describes where to recenter point
> should it move outside the window?
>
> Thanks.
>
>
It is a distance in pixels from point to the position of window-start that
would cause point to be displayed in the middle of the window.
IOW, if window-start is set to the position whose Y coordinate is
centering_position pixels above or below point, the window will show point at
its center. (Whether it's above or below depends on where point is wrt the
current window display.)
Note that "centering" is not necessarily literally the middle of the window it
could be elsewhere subject to scroll-aggressively and scroll-conservatively.