@@ -88,7 +88,8 @@ export class DiffEditorWidget2 extends DelegatingEditor implements IDiffEditor {
88
88
private _editorOptions : IEditorOptions ;
89
89
private readonly _sash : IObservable < DiffEditorSash | undefined > ;
90
90
private readonly _boundarySashes = observableValue < IBoundarySashes | undefined > ( 'boundarySashes' , undefined ) ;
91
- private readonly _renderOverviewRuler : IObservable < boolean > ;
91
+ private readonly _renderOverviewRuler = derived ( 'renderOverviewRuler' , reader => this . _options . read ( reader ) . renderOverviewRuler ) ;
92
+ private readonly _renderSideBySide = derived ( 'renderSideBySide' , reader => this . _options . read ( reader ) . renderSideBySide ) ;
92
93
93
94
private unchangedRangesFeature ! : UnchangedRangesFeature ;
94
95
@@ -124,7 +125,6 @@ export class DiffEditorWidget2 extends DelegatingEditor implements IDiffEditor {
124
125
this . _register ( applyObservableDecorations ( this . _originalEditor , this . _decorations . map ( d => d ?. originalDecorations || [ ] ) ) ) ;
125
126
this . _register ( applyObservableDecorations ( this . _modifiedEditor , this . _decorations . map ( d => d ?. modifiedDecorations || [ ] ) ) ) ;
126
127
127
- this . _renderOverviewRuler = this . _options . map ( o => o . renderOverviewRuler ) ;
128
128
this . _sash = derivedWithStore ( 'sash' , ( reader , store ) => {
129
129
const showSash = this . _options . read ( reader ) . renderSideBySide ;
130
130
this . elements . root . classList . toggle ( 'side-by-side' , showSash ) ;
@@ -152,7 +152,7 @@ export class DiffEditorWidget2 extends DelegatingEditor implements IDiffEditor {
152
152
153
153
this . _register ( autorunWithStore2 ( 'unchangedRangesFeature' , ( reader , store ) => {
154
154
this . unchangedRangesFeature = store . add ( new ( readHotReloadableExport ( UnchangedRangesFeature , reader ) ) (
155
- this . _originalEditor , this . _modifiedEditor , this . _diffModel , this . _options . map ( o => o . renderSideBySide )
155
+ this . _originalEditor , this . _modifiedEditor , this . _diffModel , this . _renderSideBySide ,
156
156
) ) ;
157
157
} ) ) ;
158
158
@@ -161,7 +161,7 @@ export class DiffEditorWidget2 extends DelegatingEditor implements IDiffEditor {
161
161
this . _originalEditor ,
162
162
this . _modifiedEditor ,
163
163
this . _diffModel ,
164
- this . _options . map ( ( o ) => o . renderSideBySide ) ,
164
+ this . _renderSideBySide ,
165
165
this ,
166
166
( ) => this . unchangedRangesFeature . isUpdatingViewZones ,
167
167
) ) ;
@@ -257,7 +257,7 @@ export class DiffEditorWidget2 extends DelegatingEditor implements IDiffEditor {
257
257
modifiedDecorations . push ( { range : i . modifiedRange , options : diffAddDecoration } ) ;
258
258
}
259
259
260
- if ( ! m . lineRangeMapping . modifiedRange . isEmpty ) {
260
+ if ( ! m . lineRangeMapping . modifiedRange . isEmpty && this . _renderSideBySide . read ( reader ) && ! currentMove ) {
261
261
modifiedDecorations . push ( { range : Range . fromPositions ( new Position ( m . lineRangeMapping . modifiedRange . startLineNumber , 1 ) ) , options : arrowRevertChange } ) ;
262
262
}
263
263
}
0 commit comments