diff options
author | Daniel Hollas <daniel.hollas@bristol.ac.uk> | 2024-05-20 18:21:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-20 18:21:56 (GMT) |
commit | c0d81b256604a1079349d82d136db43eefcb3df1 (patch) | |
tree | 7b329473132f5c28cdbedc306314d9530431cda4 /Lib/_pyrepl | |
parent | 7e1a130b8ff1ed8b3a5f00fe0f06d3916b852216 (diff) | |
download | cpython-c0d81b256604a1079349d82d136db43eefcb3df1.zip cpython-c0d81b256604a1079349d82d136db43eefcb3df1.tar.gz cpython-c0d81b256604a1079349d82d136db43eefcb3df1.tar.bz2 |
gh-118877: Fix AssertionError crash in pyrepl (#118936)
Diffstat (limited to 'Lib/_pyrepl')
-rw-r--r-- | Lib/_pyrepl/commands.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/_pyrepl/commands.py b/Lib/_pyrepl/commands.py index 456cba0..51c7afe 100644 --- a/Lib/_pyrepl/commands.py +++ b/Lib/_pyrepl/commands.py @@ -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 |