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

[Bug] DiffEditor renders revert buttons on top of editor

Open yanny7 opened this issue 1 year 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 Link

https://microsoft.github.io/monaco-editor/playground.html?source=v0.48.0#XQAAAAI5AgAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscw0sePKVciAJM8XEuX7Os378jBGtVLkr6ryuhqvky-XZ9Sy0vyFSI1m9lYQpwqOsaKmhydYWIo-9hGbv_4wlPIsEpVooDN3UCCmiQC5FjKPxzaxh5hrHBH_dDuy7gpl4xVrSKRXH-NmrPZoJzyFwC-UYLbA8Z84Bw5ZNPVFqM9fExq8cqCEwa9UoLotEqB7tH53vSyKw2myEX6Vk0efXw6arZvrQDPiuU1wUw5GpDvAxxBaBFN7YtwdjV5am9PIELafk_5c10kI3mLLevzGbYJF7DN1oyZf7AZHZlVeJvaf7s49WDtWWJNtfYQpR3ZJls3-wPokm9adpH-9unhBw

Monaco Editor Playground Code

const originalModel = monaco.editor.createModel(
	/* set from `originalModel`: */ `hello world


asdfa

`,
	"text/plain"
);
const modifiedModel = monaco.editor.createModel(
	/* set from `modifiedModel`: */ `Hello World!



asdfo

`,
	"text/plain"
);

const diffEditor = monaco.editor.createDiffEditor(
	document.getElementById("container"),
	{
		originalEditable: false,
		automaticLayout: false,
		glyphMargin: true,
	}
);
diffEditor.setModel({
	original: originalModel,
	modified: modifiedModel,
});

Reproduction Steps

Paste provided code into playground

Actual (Problematic) Behavior

From version 0.48.0 are revert buttons rendered on top of editor.

Expected Behavior

Revert buttons are rendered in correct height on modified lines

Additional Context

No response

yanny7 avatar May 17 '24 13:05 yanny7

image

yanny7 avatar May 17 '24 13:05 yanny7

Fixed in the latest stable

rzhao271 avatar Dec 18 '24 19:12 rzhao271