[Top][All Lists]

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

Re: Correct way to implement `pixel-point-and-height-at-unseen-line'?

From: Po Lu
Subject: Re: Correct way to implement `pixel-point-and-height-at-unseen-line'?
Date: Tue, 14 Dec 2021 21:48:35 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

Eli Zaretskii <> writes:

> Did you try something like this:
>   (save-excursion
>     (goto-char (window-start))
>     (vertical-motion (- (ceiling N (frame-char-height))))
>     (point))
> where N is your number of pixels?

That won't always work correctly with lines of different height: for
example, if the line above start is smaller than the default character
height of the frame, the number of lines by which to move upwards could
be too small.

reply via email to

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