pyrepl loses input and mis-positions cursor when F2 is pressed
Open
Nobody has claimed this yet.
3.13
3.14
topic-repl
type-bug
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Bug report
Bug description:
This is bad for 2 different reasons:
- pyrepl loses track of the cursor, thinking it's in the first column when it's actually in the middle of the screen somewhere, so future screen drawing operations have unexpected results
- on top of that, anything you were in the middle of typing when you pressed F2 is discarded, so if you wanted to access the history to copy something out and paste it into the command you're writing, oops, it's gone
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Contributor guide
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
Reproduce the F2 behavior in pyrepl on Linux with CPython 3.13, then trace the F2 handling and screen redraw path. Done means the current input is preserved, the cursor remains correctly positioned, and subsequent screen drawing behaves normally.
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