mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-09 01:28:50 +01:00
Fixes #221245
This commit is contained in:
committed by
Henning Dieterichs
parent
e3b021a4c5
commit
84f63bf4e5
@@ -101,6 +101,8 @@ export class DiffEditorOptions {
|
||||
}))
|
||||
.flatten()
|
||||
.map(this, v => !!v);
|
||||
|
||||
public readonly inlineViewHideOriginalLineNumbers = this.compactMode;
|
||||
}
|
||||
|
||||
function isSimpleDiff(diff: DiffState, supportsTrueDiffRendering: boolean): boolean {
|
||||
|
||||
@@ -385,8 +385,13 @@ export class DiffEditorWidget extends DelegatingEditor implements IDiffEditor {
|
||||
} else {
|
||||
gutterLeft = 0;
|
||||
|
||||
const shouldHideOriginalLineNumbers = this._options.inlineViewHideOriginalLineNumbers.read(reader);
|
||||
originalLeft = gutterWidth;
|
||||
originalWidth = Math.max(5, this._editors.original.getLayoutInfo().decorationsLeft);
|
||||
if (shouldHideOriginalLineNumbers) {
|
||||
originalWidth = 0;
|
||||
} else {
|
||||
originalWidth = Math.max(5, this._editors.original.getLayoutInfo().decorationsLeft);
|
||||
}
|
||||
|
||||
modifiedLeft = gutterWidth + originalWidth;
|
||||
modifiedWidth = fullWidth - modifiedLeft - overviewRulerPartWidth;
|
||||
|
||||
@@ -623,9 +623,11 @@ export class CodeCompareBlockPart extends Disposable {
|
||||
useTrueInlineView: true,
|
||||
},
|
||||
renderSideBySideInlineBreakpoint: 300,
|
||||
renderOverviewRuler: false,
|
||||
compactMode: true,
|
||||
hideUnchangedRegions: { enabled: true, contextLineCount: 1 },
|
||||
renderGutterMenu: false,
|
||||
lineNumbersMinChars: 1,
|
||||
...options
|
||||
}, { originalEditor: widgetOptions, modifiedEditor: widgetOptions }));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user