-
-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ftxui::ScreenInteractive disables raw mode some time after program ends #994
Comments
this problem is present on every linux terminal i tried, only xterm didn't put garbage escape symbols in console on_exit_functions.emplace(
[=] { tcsetattr(STDIN_FILENO, TCSANOW, &terminal); }); from documentation
Applications that need all of the requested changes made to work properly should follow tcsetattr() with a call to tcgetattr() and compare the appropriate field values. Unfortunately, i was not able to fix garbage escape sequence in console even trying these fixes. |
Thanks for reporting this! I guess some data has accumulated in the buffer in between the last time it was processed and when we disabled raw mode. I suspect we should clear stdin after disabling raw mode. It means adding yet another: on_exit_functions.emplace(<code to clear stdin>) before restoring the terminal configuration: on_exit_functions.emplace(
[=] { tcsetattr(STDIN_FILENO, TCSANOW, &terminal); }); Could you please try whether this would work?
They happen in |
it seems like ftxui::ScreenInteractive disables raw mode only after the program exited, so if mouse was moving on terminal screen i get a few garbage symbols in terminal
same if program stops by SIGINT or by ScreenInteractive.Exit()
minimal working example
output(sometimes) :
program is run on arm processor on embedded linux, to which I'm connecting by ssh using "GNOME Terminal" version 3.44.0 on linux mint
ftxui::ScreenInteractive.TrackMouse(false) doesn't fix it
the only consistent workaround i found is this monstrosity
The text was updated successfully, but these errors were encountered: