This commit is contained in:
Henning Dieterichs
2023-09-25 14:51:09 +02:00
committed by Henning Dieterichs
parent 33ba908ab4
commit dc22b93c59

View File

@@ -47,6 +47,7 @@ export class DiffEditorSash extends Disposable {
const enabled = this._options.enableSplitViewResizing.read(reader); const enabled = this._options.enableSplitViewResizing.read(reader);
this._sash.state = enabled ? SashState.Enabled : SashState.Disabled; this._sash.state = enabled ? SashState.Enabled : SashState.Disabled;
this.sashLeft.read(reader); this.sashLeft.read(reader);
this._dimensions.height.read(reader);
this._sash.layout(); this._sash.layout();
})); }));
} }
@@ -55,6 +56,7 @@ export class DiffEditorSash extends Disposable {
this._sash.orthogonalEndSash = sashes.bottom; this._sash.orthogonalEndSash = sashes.bottom;
} }
/** @pure */
private _computeSashLeft(desiredRatio: number, reader: IReader | undefined): number { private _computeSashLeft(desiredRatio: number, reader: IReader | undefined): number {
const contentWidth = this._dimensions.width.read(reader); const contentWidth = this._dimensions.width.read(reader);
const midPoint = Math.floor(this._options.splitViewDefaultRatio.read(reader) * contentWidth); const midPoint = Math.floor(this._options.splitViewDefaultRatio.read(reader) * contentWidth);