diff --git a/CHANGELOG.md b/CHANGELOG.md index 39ef3c7..4dd1eb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ current (development) ### Component - Feature: Support `ResizableSplit` with customizable separator. - Breaking: MenuDirection enum is renamed Direction +- Fix: Remove useless new line when using an alternative screen. ### Dom - Feature: Add the dashed style for border and separator. diff --git a/src/ftxui/component/screen_interactive.cpp b/src/ftxui/component/screen_interactive.cpp index 9f4eba7..dfca52e 100644 --- a/src/ftxui/component/screen_interactive.cpp +++ b/src/ftxui/component/screen_interactive.cpp @@ -460,9 +460,13 @@ void ScreenInteractive::PostMain() { g_active_screen->Install(); } else { Uninstall(); + + std::cout << '\r'; // On final exit, keep the current drawing and reset cursor position one // line after it. - std::cout << std::endl; + if (!use_alternative_screen_) { + std::cout << std::endl; + } } }