help-gnu-emacs
[Top][All Lists]
Advanced

[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: Emanuel Berg
Subject: Re: Correct way to implement `pixel-point-and-height-at-unseen-line'?
Date: Mon, 13 Dec 2021 03:20:36 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Po Lu wrote:

> I don't know how to make
> `pixel-point-and-height-at-unseen-line' work correctly: if
> I use `line-pixel-height', it will only report the height
> the first individual line inside a display string if there
> is one above window start, but if I use
> `window-text-pixel-size', I have to determine the region to
> measure, which is quite troublesome.
>
> For example, window start is often not the beginning of
> a visual line

`window-start', `beginning-of-visual-line' ...

You can post the code instead ... that way you don't have to
remove the dashes.

> This works okay until there is a `line-prefix' property at
> window start: in this case, window start is the beginning of
> a visual line, but it does not display at the beginning of
> the line, which means `window-text-pixel-size' will add the
> height of the current line to that of the previous line.
> I will add a workaround to pixel-scroll.el, but there must
> be a cleaner way to implement this.

Sounds pretty clean to me but difficult to say since you are
not posting the actual code.

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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