diff --git a/src/ftxui/component/screen_interactive.cpp b/src/ftxui/component/screen_interactive.cpp index bba13bb..19754bf 100644 --- a/src/ftxui/component/screen_interactive.cpp +++ b/src/ftxui/component/screen_interactive.cpp @@ -858,11 +858,13 @@ void ScreenInteractive::Draw(Component component) { ResetCursorPosition(); std::cout << ResetPosition(/*clear=*/resized); - // clear terminal output if non-fullscreen interactive screen dimx decreases + // clear terminal output if screen dimx decreases + // only on primary screen + // only on POSIX systems (linux/macos) #if !defined(_WIN32) if ((dimx < dimx_) && validated_ && !use_alternative_screen_) { - std::cout << "\033[J"; - std::cout << "\033[H"; + std::cout << "\033[J"; // clear + std::cout << "\033[H"; // move cursor to home position } #endif