[Bug] Glyph margin decorations/widgets for deleted lines not rendering in the inline view
adamsol opened this issue · comments
Adam Sołtysik commented
Reproducible in vscode.dev or in VS Code Desktop?
- Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
- Not reproducible in the monaco editor playground
Monaco Editor Playground Link
Monaco Editor Playground Code
const originalModel = monaco.editor.createModel(
/* set from `originalModel`: */ `no red square for this line in the inline view
(uncomment \`renderSideBySide: false\`)`,
"text/plain"
);
const modifiedModel = monaco.editor.createModel(
/* set from `modifiedModel`: */ `green square for this line works in both cases`,
"text/plain"
);
const diffEditor = monaco.editor.createDiffEditor(
document.getElementById("container"),
{
originalEditable: true,
automaticLayout: true,
glyphMargin: true,
renderMarginRevertIcon: false,
// renderSideBySide: false,
}
);
diffEditor.setModel({
original: originalModel,
modified: modifiedModel,
});
for (const [editor, cls] of [
[diffEditor.getOriginalEditor(), 'original-decoration'],
[diffEditor.getModifiedEditor(), 'modified-decoration'],
]) {
editor.createDecorationsCollection([
{
range: new monaco.Range(1, 1, 1, 1),
options: {
glyphMarginClassName: cls,
},
},
]);
}
Reproduction Steps
Uncomment renderSideBySide: false
.
Actual (Problematic) Behavior
The red square, which was present in the side-by-side view, disappears in the inline view.
Expected Behavior
The decorations should be rendered in both views.
Additional Context
It worked in v0.44.0.
I'm using createDecorationsCollection
in the example, but the same happens with addGlyphMarginWidget
.