mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-22 10:40:00 +08:00
Add more comments (clear on resize)
This commit is contained in:
parent
766be63c13
commit
faf7d7e560
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user