Skip to content

Commit 5abb757

Browse files
authored
1 parent e95d403 commit 5abb757

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/vs/editor/browser/widget/diffEditor/diffEditorWidget.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) Microsoft Corporation. All rights reserved.
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
5-
import { $, getWindow, h } from 'vs/base/browser/dom';
5+
import { getWindow, h } from 'vs/base/browser/dom';
66
import { IBoundarySashes } from 'vs/base/browser/ui/sash/sash';
77
import { findLast } from 'vs/base/common/arraysFind';
88
import { onUnexpectedError } from 'vs/base/common/errors';
@@ -21,6 +21,7 @@ import { AccessibleDiffViewer, AccessibleDiffViewerModelFromEditors } from 'vs/e
2121
import { DiffEditorDecorations } from 'vs/editor/browser/widget/diffEditor/components/diffEditorDecorations';
2222
import { DiffEditorSash } from 'vs/editor/browser/widget/diffEditor/components/diffEditorSash';
2323
import { DiffEditorViewZones } from 'vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones';
24+
import { DiffEditorGutter } from 'vs/editor/browser/widget/diffEditor/features/gutterFeature';
2425
import { HideUnchangedRegionsFeature } from 'vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature';
2526
import { MovedBlocksLinesFeature } from 'vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature';
2627
import { OverviewRulerFeature } from 'vs/editor/browser/widget/diffEditor/features/overviewRulerFeature';
@@ -45,7 +46,6 @@ import { DiffEditorEditors } from './components/diffEditorEditors';
4546
import { DelegatingEditor } from './delegatingEditorImpl';
4647
import { DiffEditorOptions } from './diffEditorOptions';
4748
import { DiffEditorViewModel, DiffMapping, DiffState } from './diffEditorViewModel';
48-
import { DiffEditorGutter } from 'vs/editor/browser/widget/diffEditor/features/gutterFeature';
4949

5050
export interface IDiffCodeEditorWidgetOptions {
5151
originalEditor?: ICodeEditorWidgetOptions;
@@ -56,7 +56,6 @@ export class DiffEditorWidget extends DelegatingEditor implements IDiffEditor {
5656
public static ENTIRE_DIFF_OVERVIEW_WIDTH = OverviewRulerFeature.ENTIRE_DIFF_OVERVIEW_WIDTH;
5757

5858
private readonly elements = h('div.monaco-diff-editor.side-by-side', { style: { position: 'relative', height: '100%' } }, [
59-
h('div.noModificationsOverlay@overlay', { style: { position: 'absolute', height: '100%', visibility: 'hidden', } }, [$('span', {}, 'No Changes')]),
6059
h('div.editor.original@original', { style: { position: 'absolute', height: '100%', } }),
6160
h('div.editor.modified@modified', { style: { position: 'absolute', height: '100%', } }),
6261
h('div.accessibleDiffViewer@accessibleDiffViewer', { style: { position: 'absolute', height: '100%' } }),
@@ -293,17 +292,9 @@ export class DiffEditorWidget extends DelegatingEditor implements IDiffEditor {
293292
this._movedBlocksLinesPart.set(value, undefined);
294293
});
295294

296-
this._register(applyStyle(this.elements.overlay, {
297-
width: this._layoutInfo.map((i, r) => i.originalEditor.width + (this._options.renderSideBySide.read(r) ? 0 : i.modifiedEditor.width)),
298-
visibility: derived(reader => /** @description visibility */(this._options.hideUnchangedRegions.read(reader) && this._diffModel.read(reader)?.diff.read(reader)?.mappings.length === 0)
299-
? 'visible' : 'hidden'
300-
),
301-
}));
302-
303295
this._register(Event.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition, e => this._handleCursorPositionChange(e, true)));
304296
this._register(Event.runAndSubscribe(this._editors.original.onDidChangeCursorPosition, e => this._handleCursorPositionChange(e, false)));
305297

306-
307298
const isInitializingDiff = this._diffModel.map(this, (m, reader) => {
308299
/** @isInitializingDiff isDiffUpToDate */
309300
if (!m) { return undefined; }

0 commit comments

Comments
 (0)