Compromise between Decoration.mark() and Decoration.line()

Hi, I like Decoration.mark() since it allows me to decorate inline values, Decoration.line() is also great for things like code examples.

However I need something in between. I need to add a decoration from a given start of line (say from a fifth character in the line) up until the very end of line. I need to add background color.

If I use Decoration.mark(), only visible text is decorated - the decoration doesn’t span to the end of the editor. Also, empty lines aren’t decorated at all.

If I use Decoration.line() indeed the background spans to the end of line, but it also covers the first 5 characters.

Is there a way to achieve this effect?

No, not really. I don’t even think CSS can straightforwardly express what you’re asking for here.

Well, when it comes to raw CSS I think it might be possible, with flex for example, or float. But I worry that setting this style in a crude way would probably pollute or even break editor view.

My use case is Markdown and using styles for quotes in a list. When i add > and put it in a list, then that line is a quote from > to the end of line.