Fix useless new line when using the alternative screen. (#610)

Fix:https://github.com/ArthurSonzogni/FTXUI/issues/609
This commit is contained in:
Arthur Sonzogni 2023-03-31 17:44:01 +02:00 committed by ArthurSonzogni
parent 7b08dae6d0
commit 4ce8f6d250
No known key found for this signature in database
GPG Key ID: 41D98248C074CD6C
2 changed files with 6 additions and 1 deletions

View File

@ -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.

View File

@ -460,11 +460,15 @@ 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.
if (!use_alternative_screen_) {
std::cout << std::endl;
}
}
}
/// @brief Decorate a function. It executes the same way, but with the currently
/// active screen terminal hooks temporarilly uninstalled during its execution.