Open
Description
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
No response
Monaco Editor Playground Code
goToRefSelection(range: any, editorInstance: ICodeEditor) {
editorInstance.focus();
let decorationsCollection = editorInstance.createDecorationsCollection();
const decorations = [{
range: new monaco.Range(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn),
options: {
inlineClassName: 'go-to-definition-highlight',
},
}];
decorationsCollection.set(decorations);
setTimeout(() => {
decorationsCollection.clear();
decorationsCollection = null;
decorationsCollection.set([]);
}, 5000);
}
Reproduction Steps
No response
Actual (Problematic) Behavior
after some duration removing the decoration, but when I call this method next with new decoration, previous decoration is also applying.
Expected Behavior
Need to removing the previous decorations and apply the new decorations.
Additional Context
No response
Metadata
Metadata
Assignees
Labels
No labels