@@ -29,7 +29,7 @@ import { IStorageService, StorageScope } from 'vs/platform/storage/common/storag
2929import { TabsTitleControl } from 'vs/workbench/browser/parts/editor/tabsTitleControl' ;
3030import { ITitleAreaControl } from 'vs/workbench/browser/parts/editor/titleControl' ;
3131import { NoTabsTitleControl } from 'vs/workbench/browser/parts/editor/noTabsTitleControl' ;
32- import { IEditorStacksModel , IStacksModelChangeEvent , IEditorGroup , EditorOptions , TextEditorOptions , IEditorIdentifier , EditorInput } from 'vs/workbench/common/editor' ;
32+ import { IEditorStacksModel , IStacksModelChangeEvent , IEditorGroup , EditorOptions , TextEditorOptions , IEditorIdentifier , EditorInput , PREFERENCES_EDITOR_ID , TEXT_DIFF_EDITOR_ID } from 'vs/workbench/common/editor' ;
3333import { getCodeEditor } from 'vs/editor/browser/services/codeEditorService' ;
3434import { IThemeService } from 'vs/platform/theme/common/themeService' ;
3535import { editorBackground , contrastBorder , activeContrastBorder } from 'vs/platform/theme/common/colorRegistry' ;
@@ -39,7 +39,6 @@ import { IDisposable } from 'vs/base/common/lifecycle';
3939import { ResourcesDropHandler , LocalSelectionTransfer , DraggedEditorIdentifier } from 'vs/workbench/browser/dnd' ;
4040import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry' ;
4141import { IPartService } from 'vs/workbench/services/part/common/partService' ;
42- import { TextDiffEditor } from 'vs/workbench/browser/parts/editor/textDiffEditor' ;
4342
4443export enum Rochade {
4544 NONE ,
@@ -2138,7 +2137,8 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
21382137 } ) ;
21392138
21402139 // Layout centered Editor (only in vertical layout when one group is opened)
2141- const doCentering = this . layoutVertically && this . stacks . groups . length === 1 && this . partService . isEditorLayoutCentered ( ) && ! ( this . visibleEditors [ Position . ONE ] instanceof TextDiffEditor ) ;
2140+ const id = this . visibleEditors [ Position . ONE ] ? this . visibleEditors [ Position . ONE ] . getId ( ) : undefined ;
2141+ const doCentering = this . layoutVertically && this . stacks . groups . length === 1 && this . partService . isEditorLayoutCentered ( ) && id !== PREFERENCES_EDITOR_ID && id !== TEXT_DIFF_EDITOR_ID ;
21422142 if ( doCentering && ! this . centeredEditorActive ) {
21432143 this . centeredEditorSashLeft . show ( ) ;
21442144 this . centeredEditorSashRight . show ( ) ;
0 commit comments