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

From: Dmitry Gutov <[email-masked]>
Date: Wed, 06 Aug 2014 22:02:51 +0400

On 08/06/2014 09:24 PM, Eli Zaretskii wrote:

> But that will break if the buffer text has other display properties,
> because Emacs doesn't support display strings on display strings.
> IOW, this solution only works for relatively simple text in the
> buffer.

Multiple overlays aren't much easier to work with: you can't position 
them in the middle of a piece of text that's on `display' property, 
can't position them after the end of the buffer or overlapping the 
`line-prefix' value. And if the desired column is in the middle of a 
multiple-width character like \t, you're forced to do unnatural things 
with it anyway.

> And what do you do with line-prefix and wrap-prefix?

The former is incorporated into the "replaced" text and set to "" on the 
overlay; the latter, so far, has been ignored.

> That's really crazy design (no offense)!

I didn't design it personally, just fixed some corner cases. But it has 
its advantages, see above. For example, otherwise I'm having hard time 
imagining what to do if the target column is inside the line-prefix.