emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: move_it_vertically_backward question


From: Eli Zaretskii
Subject: Re: move_it_vertically_backward question
Date: Thu, 16 Dec 2021 10:29:30 +0200

> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Thu, 16 Dec 2021 08:41:46 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > We have code in the display engine that does this in several places.
> > For example, look at what we do when we recenter the window in
> > redisplay_window.  We could factor that code out of there, put it in a
> > separate function, and teach window-text-pixel-size to find the FROM
> > position using that new function.  Then the value of the TO argument
> > for window-text-pixel-size is of course well known, and you could run
> > the rest of the function to provide you with the pixel dimensions of
> > the text in-between.
> >
> > Would that fit the bill?
> 
> I think it would, with the addition of a way to specify "the end of the
> visual line preceeding window start" as the TO argument.  That is
> because window start could be inside a screen line, causing its height
> to be taken into account when `window-text-pixel-size' calculates
> height.

I don't object to supporting such specifications for TO, but why do
you need that in this case? why not use window-start as TO?

Or maybe I misunderstand what you mean by "window start could be
inside a screen line".  Do you mean the window start is not at the
leftmost character/display element shown on that screen line?  When
does that happen?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]