tui-rs icon indicating copy to clipboard operation
tui-rs copied to clipboard

Standard Linux ttyN and termion example

Open ghost opened this issue 3 years ago • 2 comments

Describe the bug When I try to use the example cargo run --example termion_demo --release -- --tick-rate 200 without using X terminal emulators just inside the login tty, the example does not clear the terminal but overprints tty contents, so traces of those contents can be seen through the program's window.

When I press q, the screen is neither wiped nor shifted upwards (like the top does at the exit) and bash prompt occurs to be at the place of Footer sign.

XTerm or similar X terminal emulators does not have this problem, only native Linux term.

To Reproduce In Linux, switch to a free tty (Ctrl-Alt-F3, for example, for tty3), log in, type some commands (for example, try ls /usr/bin) and execute the example.

Expected behavior The screen is completely wiped out when the program starts, so no foreign text is visible -- only program window contents. At the program termination, behaviour is similar to top -- old contents is shifted and bash prompt is placed below it, not inside.

Screenshots Only camera shots are available in this mode. Will add if requested.

Desktop (please complete the following information):

  • OS: Linux
  • Terminal Emulator: Native TTY
  • Font: N/A
  • Crate version: github
  • Backend: termion

This is a bit more of a question rather than a bug declaration. I wonder if I can control these details like wiping the screen pixel-by-pixel so I can use tui frontend to write applications for native ttys as well as XTerms. If so, I would be glad to know; maybe, the example can be fixed too :)

ghost avatar Oct 04 '20 19:10 ghost

Any update on this? Same thing seems to be happening on Kitty for me.

ripxorip avatar Aug 02 '21 07:08 ripxorip

Any update on this? Same thing seems to be happening on Kitty for me.

The issue seem to go away by exlicitly calling clear on the Terminal struct

ripxorip avatar Aug 02 '21 07:08 ripxorip