python / python/cpython

pyrepl loses input and mis-positions cursor when F2 is pressed

Offen
#124,874 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

3.13 3.14 topic-repl type-bug
Vorherrschende Sprache
Python
Sterne
77.2k
Forks
35.9k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

Bug report

Bug description:

image
image
image

This is bad for 2 different reasons:

  1. 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
  2. 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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Reproduziere das F2-Verhalten in pyrepl unter Linux mit CPython 3.13 und verfolge anschließend die F2-Verarbeitung und den Pfad zum Neuzeichnen des Bildschirms. Als abgeschlossen gilt, wenn die aktuelle Eingabe erhalten bleibt, der Cursor korrekt positioniert bleibt und die anschließende Bildschirmausgabe normal funktioniert.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
cli
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.