microsoft / microsoft/monaco-editor
[Bug] lightbulb in diff editor with one window is always showing
Open
Nobody has claimed this yet.
bug
diff-editor
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
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
Monaco Editor Playground Code
var originalModel = monaco.editor.createModel(
"This line is removed on the right.\njust some text\nabcd\nefgh\nSome more text",
"text/plain"
);
var modifiedModel = monaco.editor.createModel(
"just some text\nabcz\nzzzzefgh\nSome more text\nThis line is removed on the left.",
"text/plain"
);
var diffEditor = monaco.editor.createDiffEditor(
document.getElementById("container"),
{
renderSideBySide: false,
lightbulb: {enabled:false}
}
);
diffEditor.setModel({
original: originalModel,
modified: modifiedModel,
});
Reproduction Steps
- Set
renderSideBySide: false, lightbulb: {enabled: false} - Hover over removed lines. They would be shown with the light bulb even though lightbulb is not enabled
Actual (Problematic) Behavior
Removed (red) lines are shown with the lightbulb
Expected Behavior
lightbulb is not shown
Additional Context
Tested on 0.37.0-dev.20230329
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Monaco Editor Playground reproduction using a diff editor with renderSideBySide disabled and lightbulb.enabled set to false. Trace how hovering removed lines displays the lightbulb, then verify that the lightbulb is absent in this configuration while other diff behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100