Closed NikolaDucak closed 2 years ago
Thanks!
gridbox
is very new. You are probably one of the first trying it. Thanks for finding yourself the cause of the bug!
I would be very happy getting PR for this! Don't hesitate.
Along the way, would you mind adding your regression test case into: https://github.com/ArthurSonzogni/FTXUI/blob/master/src/ftxui/dom/gridbox_test.cpp
// Regression test for https://github.com/ArthurSonzogni/FTXUI/issues/259
TEST(GridboxTest, UnfilledRectangular) {
auto root = gridbox({
{text("1"), text("2"), text("3"), text("4")},
{},
{},
});
[...]
}
You can run them using:
cmake .. -DFTXUI_BUILD_TESTS=ON;
make -j tests;
./tests;
Hello! I was looking for a TUI library for my project and I've found FTXUI. I've tried it & I love it so far, great job! After trying to use a gridbox I've gotten a segfault. This code should reproduce it:
Upon minor inspection, the root of the issue is in the consturctor of Gridbox, mainly the
filler()
is not inserted to lines due to while loop checking for y_size instead of x_size. Since in code abovex_size
is 4 andy_size
is 3 it's gonna miss some fillers & later segfault on gridbox.cpp:55 inComputeRequirement()
.I'd be very happy to submit a pull request (my very first open source PR) but if you prefer to do this minor thing yourself that is fine also!