Skip to content

Commit 9415f6b

Browse files
committed
Fix down command error reporting bug
1 parent 86977f9 commit 9415f6b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Lib/_pyrepl/commands.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,10 @@ def do(self) -> None:
289289
r.select_item(r.historyi + 1)
290290
r.pos = r.eol(0)
291291
return
292-
r.pos = len(b)
293-
r.error("end of buffer")
292+
if r.pos == len(b):
293+
r.error("end of buffer")
294+
else:
295+
r.pos = len(b)
294296
return
295297

296298
if (

0 commit comments

Comments
 (0)