From: Eli Zaretskii <eliz@gnu.org>
To: emacs-devel@gnu.org, Po Lu <luangruo@yahoo.com>
Subject: Re: centering_position in redisplay_window?
Date: Wed, 01 Dec 2021 11:01:47 +0200 [thread overview]
Message-ID: <58C719E4-32DF-4D3A-B2DF-8705A71836FD@gnu.org> (raw)
In-Reply-To: <87sfvc23nx.fsf@yahoo.com>
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.
next prev parent reply other threads:[~2021-12-01 9:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
2021-12-01 9:26 ` Po Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=58C719E4-32DF-4D3A-B2DF-8705A71836FD@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=luangruo@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.