Change:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Please search existing issues to avoid creating duplicates. --<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: --<!-- Use Help Report Issue to prefill these. --When in centered layout, opening a diff view in inline mode (as opposed to side-by-side mode) should not force the diff view into full editor width as it does for side-by-side diff views. This is a follow-up from where we discussed this might be a bug. Steps to Reproduce: centered layout a diff view in inline mode diff view now occupies full editor width (as if centered layout was not enabled) Demo: ! <!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes
how to check if diff is in inline view? would you like to submit a PR to fix this? Code pointer
I'm afraid this is too much for me at this moment. The method is not fired when I switch from inline to side-by-side diff view and I could not figure out how to query the instance for the current display mode. Both of these events would need to be handled so that we can keep the centered layout when an inline diff is opened and we should switch to full-width layout when the diff editor's layout is switched from inline to side-by-side.
no worries, thanks for trying. Peng might give some good tips, and I might also look into this in the future.
Apologies for not mentioning that I was working on this, but I implemented a fix for this in
I was playing around with this too and managed to fix it, so I created a PR. My browser did not update so I didn't see your message, sorry for the duplicate PR :sweat_smile:
No problem! haha both our bads I guess :rofl: Next time I'll comment beforehand

Discussion:
import { ActivitybarPart } from 'vs/workbench/browser/parts/activitybar/activitybarPart'; import { URI } from 'vs/base/common/uri'; import { IViewDescriptorService, ViewContainerLocation } from 'vs/workbench/common/views'; <ins> import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; </ins> export enum Settings { ACTIVITYBAR_VISIBLE = 'workbench.activityBar.visible',

const newMenubarVisibility = getMenuBarVisibility(this.configurationService, this.environmentService); this.setMenubarVisibility(newMenubarVisibility, !!skipLayout); <ins> // Centered Layout this.centerEditorLayout(this.state.editor.centered, skipLayout); </ins> } private setSideBarPosition(position: Position): void {

let smartActive = active; const activeEditor = this.editorService.activeEditor; <del> if (this.configurationService.getValue('workbench.editor.centeredLayoutAutoResize') && (this.editorGroupService.groups.length > 1 || (activeEditor && activeEditor instanceof SideBySideEditorInput))) { smartActive = false; // Respect the auto resize setting - do not go into centered layout if there is more than 1 group. </del> <ins> const isSideBySideLayout = activeEditor && activeEditor instanceof SideBySideEditorInput // DiffEditorInput inherits from SideBySideEditorInput but can still be functionally an inline editor. && (!(activeEditor instanceof DiffEditorInput) || this.configurationService.getValue('diffEditor.renderSideBySide')); const isCenteredLayoutAutoResizing = this.configurationService.getValue('workbench.editor.centeredLayoutAutoResize'); if ( isCenteredLayoutAutoResizing && (this.editorGroupService.groups.length > 1 || isSideBySideLayout) ) { smartActive = false; </ins> } // Enter Centered Editor Layout