-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: avoid child area overflow on split #10620
fix: avoid child area overflow on split #10620
Conversation
you can reproduce the original crash only if your terminal window is small enough (in the original issue description it describes a really tiny window). In general the issue is that helix panics if the window is too small to properly render splits. For example as soon as there are atleast three vsplits and you make the window really small helix crashes. Similar problem for hsplits Not sure if what you are doing here is sufficient but with a reproduction case it should be easy for you to test out |
I am able to reproduce the original issue. By the pr statement I mean the patch fixes that testcase. Though apparently I've broken some other test, looking into it now. |
ah yeah sorry I was still tired and missread that fix does look good now that I looked at the surrounding code |
I think the changes to that test are probably fine just need tonupdate the assertion |
ebd7afe
to
c4a8fdc
Compare
Though a little bit more about expected behavior. I would expect to the space being split in the equal parts and any roundings then added to the last child. The first patch does not adhere to that. It actually avoid using the gap in the calculation. And the current one (just pushed) should be fine as the child width calculated from the really used space (e.g container - all the gaps). So fixed the failing test values and added one for the original issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
Not really sure it's a proper fix but with the patch original testcase could not be reproduced.
resolves #9877