@@ -88,7 +88,8 @@ export class DiffEditorWidget2 extends DelegatingEditor implements IDiffEditor {
8888 private _editorOptions : IEditorOptions ;
8989 private readonly _sash : IObservable < DiffEditorSash | undefined > ;
9090 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 ) ;
9293
9394 private unchangedRangesFeature ! : UnchangedRangesFeature ;
9495
@@ -124,7 +125,6 @@ export class DiffEditorWidget2 extends DelegatingEditor implements IDiffEditor {
124125 this . _register ( applyObservableDecorations ( this . _originalEditor , this . _decorations . map ( d => d ?. originalDecorations || [ ] ) ) ) ;
125126 this . _register ( applyObservableDecorations ( this . _modifiedEditor , this . _decorations . map ( d => d ?. modifiedDecorations || [ ] ) ) ) ;
126127
127- this . _renderOverviewRuler = this . _options . map ( o => o . renderOverviewRuler ) ;
128128 this . _sash = derivedWithStore ( 'sash' , ( reader , store ) => {
129129 const showSash = this . _options . read ( reader ) . renderSideBySide ;
130130 this . elements . root . classList . toggle ( 'side-by-side' , showSash ) ;
@@ -152,7 +152,7 @@ export class DiffEditorWidget2 extends DelegatingEditor implements IDiffEditor {
152152
153153 this . _register ( autorunWithStore2 ( 'unchangedRangesFeature' , ( reader , store ) => {
154154 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 ,
156156 ) ) ;
157157 } ) ) ;
158158
@@ -161,7 +161,7 @@ export class DiffEditorWidget2 extends DelegatingEditor implements IDiffEditor {
161161 this . _originalEditor ,
162162 this . _modifiedEditor ,
163163 this . _diffModel ,
164- this . _options . map ( ( o ) => o . renderSideBySide ) ,
164+ this . _renderSideBySide ,
165165 this ,
166166 ( ) => this . unchangedRangesFeature . isUpdatingViewZones ,
167167 ) ) ;
@@ -257,7 +257,7 @@ export class DiffEditorWidget2 extends DelegatingEditor implements IDiffEditor {
257257 modifiedDecorations . push ( { range : i . modifiedRange , options : diffAddDecoration } ) ;
258258 }
259259
260- if ( ! m . lineRangeMapping . modifiedRange . isEmpty ) {
260+ if ( ! m . lineRangeMapping . modifiedRange . isEmpty && this . _renderSideBySide . read ( reader ) && ! currentMove ) {
261261 modifiedDecorations . push ( { range : Range . fromPositions ( new Position ( m . lineRangeMapping . modifiedRange . startLineNumber , 1 ) ) , options : arrowRevertChange } ) ;
262262 }
263263 }
0 commit comments