rich icon indicating copy to clipboard operation
rich copied to clipboard

Anti flicker on legacy windows terminal

Open sefgit opened this issue 9 months ago • 1 comments

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 avatar Apr 11 '25 03:04 sefgit

I guess you didn't find the legacy_windows boolean on the Console.

willmcgugan avatar Jun 19 '25 20:06 willmcgugan