mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-22 18:59:59 +08:00
Swapped order of hidding cursor and setting alternative screen (#75)
On some terminal, going to the alternative screen disable cursor hiding. Swap of those commands fixed that issue. Co-authored-by: d <d>
This commit is contained in:
parent
9cc3779145
commit
af4bf379bc
@ -250,6 +250,11 @@ void ScreenInteractive::Loop(Component* component) {
|
||||
install_signal_handler(SIGWINCH, OnResize);
|
||||
#endif
|
||||
|
||||
if (use_alternative_screen_) {
|
||||
std::cout << USE_ALTERNATIVE_SCREEN;
|
||||
on_exit_functions.push([] { std::cout << USE_NORMAL_SCREEN; });
|
||||
}
|
||||
|
||||
// Hide the cursor and show it at exit.
|
||||
std::cout << HIDE_CURSOR;
|
||||
std::cout << DISABLE_LINE_WRAP;
|
||||
@ -264,11 +269,6 @@ void ScreenInteractive::Loop(Component* component) {
|
||||
auto event_listener =
|
||||
std::thread(&EventListener, &quit_, event_receiver_->MakeSender());
|
||||
|
||||
if (use_alternative_screen_) {
|
||||
std::cout << USE_ALTERNATIVE_SCREEN;
|
||||
on_exit_functions.push([] { std::cout << USE_NORMAL_SCREEN; });
|
||||
}
|
||||
|
||||
// The main loop.
|
||||
while (!quit_) {
|
||||
if (!event_receiver_->HasPending()) {
|
||||
|
Loading…
Reference in New Issue
Block a user