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

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

bug#18195: 24.3.92; window-screen-lines is not accurate


From: martin rudalics
Subject: bug#18195: 24.3.92; window-screen-lines is not accurate
Date: Wed, 06 Aug 2014 18:13:41 +0200

>> Overlays don't know about newlines.
>
> We're using a multiline overlay: it both spans several lines, and its `before-string' 
property contains a multiline string when it's "on".

Still, an Emacs overlay is a display object that replaces a possibly
empty buffer string with a possibly empty string.  Any of these strings
can contain newlines but the overlay is specified only by the buffer
positions and the replacement string.

>> IIUC you neither need pixels nor lines in the end result.  You just want
>> to know whether a given overlay fits into a given window at a given
>> position.
>
> We don't have the overlay at that point in time yet: when it's created, it's 
constructed using the underlying buffer text, too.

But you have the underlying buffer text at the time you create the
overlay I suppose.  So what hinders you to get the size of the overlay
by using a temporary buffer, inserting the underlying buffer text, put
the overlay there, and calculate the resulting height?

martin





reply via email to

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