This commit is contained in:
Natural-selection1 2025-12-23 16:48:44 +08:00 committed by GitHub
commit 50e23fb76b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View file

@ -160,6 +160,8 @@ def run_multiline_interactive_console(
r.cmpltn_reset()
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()

View file

@ -0,0 +1,4 @@
Previously in the REPL, when a completion list was displayed and KeyboardInterrupt
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.