Repository navigation
feat: add an Equalize Splits command to even every split in the tab - #870
Merged
Merged
Conversation
Evening the splits was only a double-click on a border between panes, so it could not be bound to a key or run from the palette. Equalize Splits does the same from a command: it sends one ratio per split through the double-click's path, and leaves a zoomed tab, or a border still being dragged or evened, alone. It has no default shortcut; bind equalize_splits in [keybindings].
Contributor
Author
|
|
[Low impact] The PR appears safe to merge, with no outstanding findings. SummaryAdds
Reviews (2) · Last reviewed commit: "test: cover Equalize Splits during a hel..." · Reviewed by Greptile |
Owner
|
@greptileai review |
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
Adds Equalize Splits (
equalize_splits), which evens every split in the focused tab. Until now the only way was a double-click on a border between panes, so it couldn't be bound to a key or run from the palette.splits::even_targets) and sends them throughflush_split, onelayout.set_split_ratioat a time. It isn't tied to a pointer (held: false), so the drag retires once the last ratio is answered.[keybindings]. The README's keybinding notes mention it next toresize_mode.Refs #865 (item 3).
Screenshots
Not captured. The only visible change is a new "Equalize Splits" entry in the palette and the shortcut editor.
QA
cargo test -p herdr-commands: 18 passedcargo test -p herdr-gpui --bin herdr-gpui -- split_equalize menu::settings keymap palette: passed, including newendpoint::lifecycle_tests::split_equalize::command(4 tests, two of them for a held drag and a second run)the_command_evens_every_split_in_the_tabfails; without thesplit_dragguard, the held-drag and second-run tests failjust ci(Linux x86_64)just lint-linuxjust lint-windowsequalize_splitsin[keybindings]and confirm the key does the same