From 7f0381e30ae649723750d2a89b516865d6fbac2e Mon Sep 17 00:00:00 2001 From: ArthurSonzogni Date: Wed, 18 Sep 2019 22:02:51 +0200 Subject: [PATCH] Emit a new line when a component is interrupted. While running a component, make sure to reset the cursor at the end of the component and insert a new line. This fixes: https://github.com/ArthurSonzogni/FTXUI/issues/6 --- src/ftxui/component/screen_interactive.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ftxui/component/screen_interactive.cpp b/src/ftxui/component/screen_interactive.cpp index c0d8ba38..0ffa31b9 100644 --- a/src/ftxui/component/screen_interactive.cpp +++ b/src/ftxui/component/screen_interactive.cpp @@ -111,7 +111,7 @@ void ScreenInteractive::Loop(Component* component) { std::cout << reset_cursor_position; std::cout << SHOW_CURSOR; std::cout << ENABLE_LINE_WRAP; - std::cout << std::flush; + std::cout << std::endl; }); // Handle resize.