Skip to content

Anti flicker on legacy windows terminal #3696

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sefgit
Copy link

@sefgit sefgit commented Apr 11, 2025

Type of changes

  • [x ] Bug fix
  • New feature
  • Documentation / docstrings
  • Tests
  • Other

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • I've added tests for new code.
  • [ x] I accept that @willmcgugan may be pedantic in the code review.

Description

Solving issues #3264 and many similar issues running rich on Windows Legacy Terminal.

To reduce flickering on Windows Legacy Terminal, it is best not to erase old screen content as suggested on this stackoverflow python curses tty screen blink](https://stackoverflow.com/questions/24964940/python-curses-tty-screen-blink)

Since I couldn't find a reliable way to detect Windows Legacy Terminal, I opt for "no_clear" flag instead.
Feel free to modify this patch.

sefgit added 2 commits April 11, 2025 09:45
as noted here:
https://stackoverflow.com/questions/24964940/python-curses-tty-screen-blink
The user sees the old screen, then a completely blank screen, then your new screen.

Do not clear line, just move to home.
add no_clear flag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant