Henning Dieterichs
2025-10-15 12:58:20 +02:00
committed by GitHub
parent 2b00e85c86
commit 70c82b00a9

View File

@@ -92,7 +92,7 @@ export class DiffEditorWidget extends DelegatingEditor implements IDiffEditor {
codeEditorWidgetOptions: IDiffCodeEditorWidgetOptions,
@IContextKeyService private readonly _parentContextKeyService: IContextKeyService,
@IInstantiationService private readonly _parentInstantiationService: IInstantiationService,
@ICodeEditorService codeEditorService: ICodeEditorService,
@ICodeEditorService private readonly _codeEditorService: ICodeEditorService,
@IAccessibilitySignalService private readonly _accessibilitySignalService: IAccessibilitySignalService,
@IEditorProgressService private readonly _editorProgressService: IEditorProgressService,
) {
@@ -180,7 +180,7 @@ export class DiffEditorWidget extends DelegatingEditor implements IDiffEditor {
});
this._diffValue = this._diffModel.map((m, r) => m?.diff.read(r));
this.onDidUpdateDiff = Event.fromObservableLight(this._diffValue);
codeEditorService.willCreateDiffEditor();
this._codeEditorService.willCreateDiffEditor();
this._contextKeyService.createKey('isInDiffEditor', true);
@@ -344,7 +344,10 @@ export class DiffEditorWidget extends DelegatingEditor implements IDiffEditor {
this._createDiffEditorContributions();
codeEditorService.addDiffEditor(this);
this._codeEditorService.addDiffEditor(this);
this._register(toDisposable(() => {
this._codeEditorService.removeDiffEditor(this);
}));
this._gutter = derivedDisposable(this, reader => {
return this._options.shouldRenderGutterMenu.read(reader)