File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
src/vs/workbench/contrib/mergeEditor/browser/view Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -307,16 +307,17 @@ export class MergeEditor extends AbstractTextEditor<IMergeEditorViewState> {
307
307
this . _ctxBaseResourceScheme . set ( model . base . uri . scheme ) ;
308
308
309
309
const viewState = this . loadEditorViewState ( input , context ) ;
310
- this . _applyViewState ( viewState ) ;
311
-
312
- this . _sessionDisposables . add ( thenIfNotDisposed ( model . onInitialized , ( ) => {
313
- const firstConflict = model . modifiedBaseRanges . get ( ) . find ( r => r . isConflicting ) ;
314
- if ( ! firstConflict ) {
315
- return ;
316
- }
317
-
318
- this . input1View . editor . revealLineInCenter ( firstConflict . input1Range . startLineNumber ) ;
319
- } ) ) ;
310
+ if ( viewState ) {
311
+ this . _applyViewState ( viewState ) ;
312
+ } else {
313
+ this . _sessionDisposables . add ( thenIfNotDisposed ( model . onInitialized , ( ) => {
314
+ const firstConflict = model . modifiedBaseRanges . get ( ) . find ( r => r . isConflicting ) ;
315
+ if ( ! firstConflict ) {
316
+ return ;
317
+ }
318
+ this . input1View . editor . revealLineInCenter ( firstConflict . input1Range . startLineNumber ) ;
319
+ } ) ) ;
320
+ }
320
321
321
322
322
323
this . _sessionDisposables . add ( autorunWithStore ( ( reader , store ) => {
You can’t perform that action at this time.
0 commit comments