Repository navigation
fix(tui): tui split no longer hangs with many 1fr children - #19566
Merged
Merged
Conversation
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.
Description
A
tui splitwith 30 or more1frchildren can hang, because ratatui's layout solver may not finish with that manyFillconstraints. At 40, none of 10 runs did.Up to 16
Fillchildren, ratatui solves the split as before, so ordinary splits don't change. Past 16, the solver gets theFillchildren as oneFillof their summed weight, andpin_fillsinlayout.rsthen gives each child its share of that space as aLength. WithLengthandmax:Nsiblings, those are the widths ratatui's own solve gives. With anN%sibling a child can be one cell off. With amin:Nsibling, theFillchildren and themin:None can be up to two cells off. Drawing, mouse drags and the arrow-key resize all go through the newSplitDir::split.User-facing changes (Release notes)
Fixed
tui splithanging when it has 30 or more1frchildren.Additional notes