mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-22 18:59:59 +08:00
Fix cursor position for dom.
This commit is contained in:
parent
acc7012f58
commit
e6614d6363
@ -51,7 +51,7 @@ class VBox : public Node {
|
||||
remaining_flex -= child->requirement().flex.y;
|
||||
child_box.bottom += added_space;
|
||||
}
|
||||
child_box.bottom = std::min(child_box.bottom, box.bottom);
|
||||
child_box.bottom = std::min(child_box.bottom, box.bottom-1);
|
||||
|
||||
child->SetBox(child_box);
|
||||
y = child_box.bottom + 1;
|
||||
|
@ -46,7 +46,7 @@ TEST(VBoxTest, ScreenSmaller1Flex) {
|
||||
|
||||
TEST(VBoxTest, ScreenFitFlex) {
|
||||
auto root = vbox(text(L"text_1"), filler(), text(L"text_2"));
|
||||
Screen screen(6, 2);
|
||||
Screen screen(15, 10);
|
||||
Render(screen, root.get());
|
||||
|
||||
EXPECT_EQ("text_1\ntext_2", screen.ToString());
|
||||
|
@ -96,6 +96,7 @@ std::string Screen::ResetPosition() {
|
||||
for (size_t y = 1; y < dimy_; ++y) {
|
||||
ss << "\e[2K\r\e[1A";
|
||||
}
|
||||
ss << '\r';
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user