Folding and widgets at the end of the fold range

Hi! Just have a quick question. Is there a way to include end-of-range widgets to be hidden when folding? Or is foldedRanges something that should be checked when generating the decorations? Here, for example, the end-of-line decoration stays even when the line was included in the fold.

Thanks!

Not currently. Replacing decorations are defined in a way such that they only cover the content between their endpoints, not widgets at those points.

Got it. Thank you!