Skip to content

Commit e427fef

Browse files
authored
fix: should set renderMarginRevertIcon=false when diffEditor is readOnly (#2492)
1 parent 5c345bf commit e427fef

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/editor/src/browser/editor-collection.service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,10 +706,12 @@ export class BrowserDiffEditor extends WithEventBus implements IDiffEditor {
706706
? this.modifiedEditor.currentDocumentModel.languageId
707707
: undefined;
708708
const options = getConvertedMonacoOptions(this.configurationService, uriStr, languageId);
709+
const readOnly = this.isReadonly();
709710
this.monacoDiffEditor.updateOptions({
710711
...options.diffOptions,
711712
...this.specialOptions,
712-
readOnly: this.isReadonly(),
713+
readOnly,
714+
renderMarginRevertIcon: !readOnly,
713715
});
714716

715717
if (this.currentUri) {

0 commit comments

Comments
 (0)