Skip to content

Commit 3e64840

Browse files
committed
gh-134869: Fix Ctrl+C corrupts autocomplete
1 parent c600310 commit 3e64840

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/_pyrepl/simple_interact.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,10 @@ def maybe_run_command(statement: str) -> bool:
158158
input_n += 1
159159
except KeyboardInterrupt:
160160
r = _get_reader()
161+
r.cmpltn_menu_visible = False
162+
r.cmpltn_message_visible = False
163+
r.cmpltn_menu = []
164+
r.cmpltn_menu_end = 0
161165
if r.input_trans is r.isearch_trans:
162166
r.do_cmd(("isearch-end", [""]))
163167
r.pos = len(r.get_unicode())

0 commit comments

Comments
 (0)