GNU bug report logs -
#18195
24.3.92; window-screen-lines is not accurate
Previous Next
Reported by: Dmitry <dgutov <at> yandex.ru>
Date: Tue, 5 Aug 2014 02:01:01 UTC
Severity: normal
Found in version 24.3.92
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>> 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
This bug report was last modified 10 years and 289 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.