You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const originalModel = monaco.editor.createModel(
/* set from `originalModel`: */ `test
first deleted line
second deleted line
third deleted line
test end
`
);
const modifiedModel = monaco.editor.createModel(
/* set from `modifiedModel`: */ `test
test end
`,
"text/plain"
);
const diffEditor = monaco.editor.createDiffEditor(
document.getElementById("container"),
{
automaticLayout: true,
renderSideBySide: false,
}
);
diffEditor.setModel({
original: originalModel,
modified: modifiedModel,
});
Reproduction Steps
Ensure that the diff is not rendered side by side.
Click on the text "first deleted line" in the diff.
When the menu appears, click "Copy deleted line (2)"
Paste the text you copied somewhere.
Actual (Problematic) Behavior
The editor copies the wrong line to the clipboard. Selecting the line that reads "first deleted line" will instead copy "second deleted line". (Similarly, selecting the second deleted line will copy "third deleted line")
Expected Behavior
The editor should copy the line the user selects. In the example above, I would expect "first deleted line" to be copied to the clipboard.
Additional Context
2024-11-06.18-20-17.mp4
The text was updated successfully, but these errors were encountered:
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Link
https://microsoft.github.io/monaco-editor/playground.html?source=v0.52.0#XQAAAAI-AgAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscw0uYPhVciAJM8XEuX7Os378jBGtVLkr6ryuhqvky-XZ9Sy0vyFSI1m9lYQpwqOsaKmhydYWIo-9hGbv_4wlPJJNj2s0fBlAbpnWQKRQl_KqfjZ7Y8b4i7lnJlWuxghO45uGGUR8VM5jAvPsH3I2NM3W9K9BnAQavyEibsHrEfRInKDkV6AWa7Y66W6xPeWpYo8pTTNmXxGVjEoPjIrqcqJvKmzwkU0_mpy27Z7xmlsV6AIkiP2ykHXMabDIeclXQVe9icS1wY262RCVnffcUWD6Lww58FtLwijorztBuhMplXhL917hhNRarAO51l2NGdNwfuJtF0cFLIjXyjRPMeX__YNQtI
Monaco Editor Playground Code
Reproduction Steps
Actual (Problematic) Behavior
The editor copies the wrong line to the clipboard. Selecting the line that reads "first deleted line" will instead copy "second deleted line". (Similarly, selecting the second deleted line will copy "third deleted line")
Expected Behavior
The editor should copy the line the user selects. In the example above, I would expect "first deleted line" to be copied to the clipboard.
Additional Context
2024-11-06.18-20-17.mp4
The text was updated successfully, but these errors were encountered: