Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diff Editor field Rename #198872

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/vs/editor/browser/widget/diffEditor/diffEditorWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class DiffEditorWidget extends DelegatingEditor implements IDiffEditor {
private readonly _editors: DiffEditorEditors;

private readonly _overviewRulerPart: IObservable<OverviewRulerPart | undefined>;
private readonly movedBlocksLinesPart = observableValue<MovedBlocksLinesPart | undefined>(this, undefined);
private readonly _movedBlocksLinesPart = observableValue<MovedBlocksLinesPart | undefined>(this, undefined);

public get collapseUnchangedRegions() { return this._options.hideUnchangedRegions.get(); }

Expand Down Expand Up @@ -253,7 +253,7 @@ export class DiffEditorWidget extends DelegatingEditor implements IDiffEditor {
)
).recomputeInitiallyAndOnChange(this._store, value => {
// This is to break the layout info <-> moved blocks lines part dependency cycle.
this.movedBlocksLinesPart.set(value, undefined);
this._movedBlocksLinesPart.set(value, undefined);
});

this._register(applyStyle(this.elements.overlay, {
Expand Down Expand Up @@ -313,7 +313,7 @@ export class DiffEditorWidget extends DelegatingEditor implements IDiffEditor {
const originalWidth = sashLeft ?? Math.max(5, this._editors.original.getLayoutInfo().decorationsLeft);
const modifiedWidth = width - originalWidth - (this._overviewRulerPart.read(reader)?.width ?? 0);

const movedBlocksLinesWidth = this.movedBlocksLinesPart.read(reader)?.width.read(reader) ?? 0;
const movedBlocksLinesWidth = this._movedBlocksLinesPart.read(reader)?.width.read(reader) ?? 0;
const originalWidthWithoutMovedBlockLines = originalWidth - movedBlocksLinesWidth;
this.elements.original.style.width = originalWidthWithoutMovedBlockLines + 'px';
this.elements.original.style.left = '0px';
Expand Down