monaco-editor icon indicating copy to clipboard operation
monaco-editor copied to clipboard

when i use deltaDecorations,Range not Effect[Bug]

Open TianYu0605 opened this issue 3 years ago • 1 comments

Reproducible in vscode.dev or in VS Code Desktop?

  • [X] Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Code

const model = editor.getModel()
const rangeList = [{
  range: new monaco.Range(5, 1, 5, 1),
  options: {
    isWholeLine: true,
    linesDecorationsClassName: styles.myLineDecoration,
    overviewRuler: { position: 1, color: 'lightblue', darkColor: 'white' },
    minimap: { position: 1 }
  }
}]
model.modified.deltaDecorations([], rangeList)

Actual Behavior

image

Now all lines have decoration,and each line is added with the class image

Expected Behavior

image

I want only fifth line has decoration

Additional Context

what should i do, can you help me?

TianYu0605 avatar May 07 '22 06:05 TianYu0605

Your example does not work. Can you update it? Thanks!

hediet avatar Jul 22 '22 14:07 hediet

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

github-actions[bot] avatar Feb 07 '23 15:02 github-actions[bot]