Skip to content
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Lib/_pyrepl/simple_interact.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ def maybe_run_command(statement: str) -> bool:
r = _get_reader()
if r.input_trans is r.isearch_trans:
r.do_cmd(("isearch-end", [""]))
if r.cmpltn_menu_choices:
r.cmpltn_reset()
r.pos = len(r.get_unicode())
r.dirty = True
r.refresh()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Previously in the REPL, when a completion list was displayed and KeyboardInterrupt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love the effort, but this is too long. Can we shorten this to a single sentence? (We don't need technical details, just what was fixed.)

was triggered using Ctrl+C, the completion list would persist and duplicate with
each KeyboardInterrupt. Now, when KeyboardInterrupt occurs, the completion list
is properly cleared, consistent with the behavior of other errors.
Loading