rich
rich copied to clipboard
Anti flicker on legacy windows terminal
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.
I guess you didn't find the legacy_windows boolean on the Console.