mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-27 13:48:51 +08:00
Merge 3b01a5a0ad
into 70bc44d28b
This commit is contained in:
commit
3830655b5b
@ -858,6 +858,13 @@ void ScreenInteractive::Draw(Component component) {
|
|||||||
ResetCursorPosition();
|
ResetCursorPosition();
|
||||||
std::cout << ResetPosition(/*clear=*/resized);
|
std::cout << ResetPosition(/*clear=*/resized);
|
||||||
|
|
||||||
|
// If the terminal width decrease, the terminal emulator will start wrapping
|
||||||
|
// lines and make the display dirty. We should clear it completely.
|
||||||
|
if ((dimx < dimx_) && !use_alternative_screen_) {
|
||||||
|
std::cout << "\033[J"; // clear terminal output
|
||||||
|
std::cout << "\033[H"; // move cursor to home position
|
||||||
|
}
|
||||||
|
|
||||||
// Resize the screen if needed.
|
// Resize the screen if needed.
|
||||||
if (resized) {
|
if (resized) {
|
||||||
dimx_ = dimx;
|
dimx_ = dimx;
|
||||||
|
Loading…
Reference in New Issue
Block a user