File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
src/vs/editor/browser/widget/diffEditorWidget2 Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -315,6 +315,11 @@ export class DiffEditorWidget2 extends DelegatingEditor implements IDiffEditor {
315315 override getModel ( ) : IDiffEditorModel | null { return this . _diffModel . get ( ) ?. model ?? null ; }
316316
317317 override setModel ( model : IDiffEditorModel | null | IDiffEditorViewModel ) : void {
318+ if ( ! model && this . _diffModel . get ( ) ) {
319+ // Transitioning from a model to no-model
320+ this . _reviewPane . hide ( ) ;
321+ }
322+
318323 const vm = model ? ( 'model' in model ) ? model : this . createViewModel ( model ) : undefined ;
319324 this . _editors . original . setModel ( vm ? vm . model . original : null ) ;
320325 this . _editors . modified . setModel ( vm ? vm . model . modified : null ) ;
Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ export class DiffReview2 extends Disposable {
277277 }
278278 }
279279
280- private hide ( ) : void {
280+ public hide ( ) : void {
281281 this . _isVisibleObs . set ( false , undefined ) ;
282282 this . _diffEditor . focus ( ) ;
283283 this . layout ( ) ;
You can’t perform that action at this time.
0 commit comments