mirror of
https://github.com/python/cpython.git
synced 2025-07-29 22:24:49 +00:00
[3.13] gh-118877: Fix AssertionError crash in pyrepl (GH-118936) (#119363)
(cherry picked from commit c0d81b2566
)
Co-authored-by: Daniel Hollas <daniel.hollas@bristol.ac.uk>
This commit is contained in:
parent
f15fbe9991
commit
e992217810
2 changed files with 25 additions and 4 deletions
|
@ -34,9 +34,7 @@ import os
|
|||
|
||||
# types
|
||||
if False:
|
||||
from .reader import Reader
|
||||
from .historical_reader import HistoricalReader
|
||||
from .console import Event
|
||||
|
||||
|
||||
class Command:
|
||||
|
@ -245,7 +243,7 @@ class up(MotionCommand):
|
|||
x, y = r.pos2xy()
|
||||
new_y = y - 1
|
||||
|
||||
if new_y < 0:
|
||||
if r.bol() == 0:
|
||||
if r.historyi > 0:
|
||||
r.select_item(r.historyi - 1)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue