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 {
315
315
override getModel ( ) : IDiffEditorModel | null { return this . _diffModel . get ( ) ?. model ?? null ; }
316
316
317
317
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
+
318
323
const vm = model ? ( 'model' in model ) ? model : this . createViewModel ( model ) : undefined ;
319
324
this . _editors . original . setModel ( vm ? vm . model . original : null ) ;
320
325
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 {
277
277
}
278
278
}
279
279
280
- private hide ( ) : void {
280
+ public hide ( ) : void {
281
281
this . _isVisibleObs . set ( false , undefined ) ;
282
282
this . _diffEditor . focus ( ) ;
283
283
this . layout ( ) ;
You can’t perform that action at this time.
0 commit comments