* centering_position in redisplay_window?
[not found] <87sfvc23nx.fsf.ref@yahoo.com>
@ 2021-12-01 7:19 ` Po Lu
2021-12-01 9:01 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Po Lu @ 2021-12-01 7:19 UTC (permalink / raw)
To: emacs-devel
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: centering_position in redisplay_window?
2021-12-01 7:19 ` centering_position in redisplay_window? Po Lu
@ 2021-12-01 9:01 ` Eli Zaretskii
2021-12-01 9:26 ` Po Lu
0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2021-12-01 9:01 UTC (permalink / raw)
To: emacs-devel, Po Lu
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: centering_position in redisplay_window?
2021-12-01 9:01 ` Eli Zaretskii
@ 2021-12-01 9:26 ` Po Lu
0 siblings, 0 replies; 3+ messages in thread
From: Po Lu @ 2021-12-01 9:26 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
> 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.
Thanks for the explanation, I think I understand now.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-01 9:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <87sfvc23nx.fsf.ref@yahoo.com>
2021-12-01 7:19 ` centering_position in redisplay_window? Po Lu
2021-12-01 9:01 ` Eli Zaretskii
2021-12-01 9:26 ` Po Lu
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.