[3.14] gh-134869: Fix Ctrl+C corrupts REPL autocomplete (GH-134929) (#137926)
Some checks are pending
Tests / Windows MSI (push) Blocked by required conditions
Tests / Check if the ABI has changed (push) Blocked by required conditions
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / Android (aarch64) (push) Blocked by required conditions
Tests / Android (x86_64) (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Sanitizers (push) Blocked by required conditions
Tests / Cross build Linux (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run

gh-134869: Fix Ctrl+C corrupts REPL  autocomplete (GH-134929)
(cherry picked from commit 8750e5ecfc)

Co-authored-by: ggqlq <124190229+ggqlq@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2025-08-18 23:21:55 +02:00 committed by GitHub
parent c9e2e15438
commit 5034b6491a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View file

@ -158,6 +158,7 @@ def run_multiline_interactive_console(
input_n += 1
except KeyboardInterrupt:
r = _get_reader()
r.cmpltn_reset()
if r.input_trans is r.isearch_trans:
r.do_cmd(("isearch-end", [""]))
r.pos = len(r.get_unicode())

View file

@ -0,0 +1 @@
Fix an issue where pressing Ctrl+C during tab completion in the REPL would leave the autocompletion menu in a corrupted state.