microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
158.92k stars 27.79k forks source link

Maximizing the current editor while in zen mode causes current editor group size toggle state to be lost #212034

Open axefrog opened 2 weeks ago

axefrog commented 2 weeks ago

Does this issue occur when all extensions are disabled?: Yes

When maximizing an editor group, normally the sizes of each editor group are restored properly when toggling maximize off. In zen mode however, toggling maximize off causes the layout to enter a state where the current editor is expanded fully and all other editor groups are collapsed to their minimum sizes. The command "Toggle Editor Group Sizes" needs to then be executed twice to restore the original layout that was active before one of the editor groups was maximized. This is a confusing experience because it initially feels like all of the custom sizes chosen earlier have been lost, and only toggling the group sizes twice (and it isn't even obvious that toggling these sizes is even a feature) reveals that sizes haven't been lost, but rather just the toggle state of the current editor group sizes.

This only happens when toggling maximize off while still in zen mode. Maximizing while in zen mode, then exiting zen mode before unmaximizing, yields correct behaviour. So the problem appears to be specific to unmaximizing while still in zen mode.

Steps to Reproduce:

  1. Create a layout with multiple columns and rows. Drag dividers to set a custom size for each pane.
  2. Enter zen mode.
  3. Toggle maximize ON for one of the current editors.
  4. Toggle maximize OFF. All editor groups other than the current one have been toggled to a collapsed state.