Decoration.replace side

Everything else looks good so far. I will send this out for beta testing with actual users soon, thank you!

Quick update: Seems like this was able to cover almost every use case I had plans for, with a single exception:

Folding (being inline replacements) is unable to completely cover block replacements. Here’s an example:

Plaintext:
image

Rendered:
image

Folded:
image

Expected:
(If we put the cursor at the end of the fold, it actually works)
image

I don’t really know how to map those screenshots to a decoration structure. Can you give a textual description (or a script) of the decorations you’re creating (and a description of how you’d like the behavior of the editor to differ from what it currently does)?

Apologies!

Here’s how I’d describe the scenario:
[] describes the block replacement widget, {} describes the folding area

Expected:

## Heading{

[```
some code block
```]}
### Next heading

When rendered:

## Heading...
### Next heading

Observed behavior (notice the fold ends before the block widget):

## Heading{

[```
some code block
```}]
### Next heading

When rendered:

## Heading...
[Block widget still shows up here]
### Next heading

I agree that that behavior is usually not what you want. This patch adjusts it.