prompt-toolkit / prompt-toolkit/python-prompt-toolkit
another TokenListControl question
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 815
- PR merge metrics
- No merged PRs in 30d
Description
this already the third TokenListControl question in a week... I hope I am not bothering you :)
I am working on a "list control" using TokenListControl:

after the selection is made the list is removed and the question and answer remains...
This all basically works. If I use multiple of these list controls and I resize the terminal window sometimes a line with an already answered question gets lost. I am certain that this issue is caused by how I use prompt-toolkit. I have other probably related issues that I have not investigated enough to describe them here. So my question is how do I control which parts (which TokenListControls) stay on the screen and which parts are cleaned up?
Do I have to call some teardown / cleanup function?
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 by reproducing the issue with multiple TokenListControl list controls and a terminal resize, then inspect how prompt-toolkit handles answered questions and screen cleanup. Determine whether a teardown or cleanup function controls which TokenListControls remain visible, and verify that previously answered lines are preserved after resizing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100