Subject: Re: bug#65896: 30.0.50; folding text with text properties prevents background from extending past the newline

From: StrawberryTea <[email-masked]>
Date: Thu, 05 Oct 2023 15:59:14 -0500

Okay. I have posted the code from earlier in the Backline package’s issue
tracker so hopefully I or someone else will pick up on this Elisp solution and
improve it down the road and get it into Backline, then eventually Org and/or
Outline.
Eli Zaretskii <[email-masked]> writes:

>> From: StrawberryTea <[email-masked]>
>> Cc: [email-masked], [email-masked], [email-masked],
>>  [email-masked]
>> Date: Sun, 01 Oct 2023 23:28:55 -0500
>>
>> Sure. Basically, I want :extend to apply to a line with a folded region even
>> though the newline at the end itself does not have the :extend property. So I
>> want the extend property to somehow propagate across a line to the newline at
>> the end, even if it does not have the :extend property. This would allow for
>> :extend to work as expected when we have a a folded region that extends across
>> multiple lines but the end of the folded region does not have the :extend
>> property.
>
> You say “propagate the :extend property”, but you really mean
> “propagate the face”, right?  Because propagating :extend alone might
> then show the wrong face extended, as the newline might have a
> different face.
>
> Anyway, this kind of thing can be easily done by the command that
> folds the text: it could place a face with a suitably computed :extend
> attribute on that newline.  Right?
>
> Changing the display engine to do something like that will be much
> harder, or even impossible, since the display engine currently
> basically ignores the faces of invisible text, and the case of folded
> text is not special in any way from the POV of the display engine.  So
> making such a change will likely produce incompatible behavior changes
> in other cases.