prompt-toolkit / prompt-toolkit/python-prompt-toolkit
Using print_container causes CPR codes to leak to terminal
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 815
- PR merge metrics
- No merged PRs in 30d
Description
Here is a minimal repro (using version 3.0.7, 3.0.18):
from prompt_toolkit.shortcuts import print_container
from prompt_toolkit.widgets import HorizontalLine
print_container(HorizontalLine())
$ python3 cli-foo.py
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
$ ;1R
Same result for both iTerm2 and OSX built-in Terminal.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal Python reproduction using print_container(HorizontalLine()) and inspect the terminal output on the reported macOS terminals. Trace the print_container entry point and reproduce the trailing CPR code; done means the container renders without leaking CPR codes to the terminal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100