# workspace: Add command to reset pane sizes \(\#59046\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/dde7c1c07f026177338a8c1948c6591090ffba93)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: dde7c1c07f026177338a8c1948c6591090ffba93

Requested commit: dde7c1c07f026177338a8c1948c6591090ffba93

Commit: dde7c1c07f026177338a8c1948c6591090ffba93

Tree: 9c97fe51f2f1d2bd71b8713bb8a75280d44571a6

Author: Ânderson Q\.

Committer: GitHub

## Message

```
workspace: Add command to reset pane sizes (#59046)

## Summary

Exposes the existing recursive pane-size reset as a command-palette
action, so it can be invoked outside of vim mode.

The center pane grid's sizes can already be evened out by
double-clicking a divider, or via `vim::ResetPaneSizes` (`ctrl-w =`)
when vim mode is on, but there is no general action for it — so users
not in vim mode have no discoverable way to undo a drifted split layout
in one step.

## How it works

`workspace::ResetPaneSizes` (palette: "workspace: reset pane sizes")
calls the existing `Workspace::reset_pane_sizes`, which resets every
`PaneAxis` in the center pane group to equal flexes, recursing into
nested splits. The split structure is preserved — no panes are added,
removed, or rearranged, only their sizes are equalized. This is the same
path the vim `ctrl-w =` binding and the divider double-click already
use.

## Out of scope

- Docks (left/right/bottom panels) — they keep their existing `Reset
Active Dock Size` / `Reset Open Docks Size` actions.
- The terminal panel's internal splits — it is a separate panel, not
part of the center pane group.
- No default keybinding (palette-only); vim users keep `ctrl-w =`.

## Testing

Added `test_reset_pane_sizes`: builds a nested split (a horizontal axis
of three panes whose last child is a vertical split), skews every axis's
flexes, dispatches the action, and asserts every axis returns to uniform
sizes.

Release Notes:

- Added a `workspace: reset pane sizes` command that equalizes the sizes
of all panes in the center group
```

## Parents

- [03a8544040ff95ec2e7921ca71c83799ad7f17cd](https://git.cafe/gitcafe/zed/commit/03a8544040ff95ec2e7921ca71c83799ad7f17cd?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/dde7c1c07f026177338a8c1948c6591090ffba93?format=markdown)
