Skip to content

Equalize splits based on children oriented in the same direction - #7710

Merged
mitchellh merged 1 commit into
ghostty-org:mainfrom
ibash:equalize
Jun 28, 2025
Merged

mitchellh merged 1 commit into
ghostty-org:mainfrom
ibash:equalize

Conversation

@ibash

@ibash ibash commented Jun 28, 2025 •

Copy link
Copy Markdown
Contributor

This changes equalization so it only counts children oriented in the same direction.

This makes splits a bit more aesthetic, and replicates how split equalization works in neovim.

This is how splits look before this change:

Notice how the left pane gets squeezed.

Before equalization
Screenshot 2025-06-28 at 8 47 40 AM

After equalization
Screenshot 2025-06-28 at 8 47 49 AM


And here's how the equalization works after this change:

Before equalization
Screenshot 2025-06-28 at 8 48 18 AM

After equalization
Screenshot 2025-06-28 at 8 48 24 AM

For many splits it looks much more aesthetic:
Screenshot 2025-06-28 at 8 48 28 AM
Screenshot 2025-06-28 at 8 48 35 AM

This changes equalization so it only counts children oriented in the
same direction.

This makes splits a bit more aesthetic, and replicates how split
equalization works in neovim.
@ibash
ibash requested a review from a team as a code owner June 28, 2025 07:06
@00-kat 00-kat added os/macos gui GUI or app issue regardless of platform (i.e. Swift, GTK) labels Jun 28, 2025
@mitchellh

Copy link
Copy Markdown
Contributor

Thanks, this behaves a lot more like other applications with splits so this feels good to me. We should plan on migrating this work to GTK too.

@mitchellh
mitchellh merged commit 1607f76 into ghostty-org:main Jun 28, 2025
@github-actions github-actions Bot added this to the 1.2.0 milestone Jun 28, 2025
mitchellh added a commit that referenced this pull request Aug 11, 2025
Fixes known issues from #8202. Also brings in the better equalization
logic on macOS from #7710.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gui GUI or app issue regardless of platform (i.e. Swift, GTK) os/macos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants