workspace: Add command to reset pane sizes - #59046
Merged
ChristopherBiscardi merged 1 commit intoJun 11, 2026
Merged
Conversation
Expose 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 was no general action for it. The new workspace::ResetPaneSizes resets every axis in the center pane group to equal sizes, preserving the split layout. It reuses the same Workspace::reset_pane_sizes path the vim binding does. Docks and the terminal panel are left untouched (they have their own reset actions).
ChristopherBiscardi
enabled auto-merge
June 11, 2026 03:57
This was referenced Jun 18, 2026
Closed
This was referenced Jul 1, 2026
This was referenced Jul 10, 2026
jonx
pushed a commit
to jonx/zed-aros
that referenced
this pull request
Jul 17, 2026
## 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
jolutz
pushed a commit
to jolutz/zed
that referenced
this pull request
Aug 8, 2026
## 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 existingWorkspace::reset_pane_sizes, which resets everyPaneAxisin 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 vimctrl-w =binding and the divider double-click already use.Out of scope
Reset Active Dock Size/Reset Open Docks Sizeactions.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:
workspace: reset pane sizescommand that equalizes the sizes of all panes in the center group