mirror of
https://github.com/python/cpython.git
synced 2026-04-15 16:21:24 +00:00
PyREPL was still carrying over two readline-specific tricks from the fancy completer: a synthetic CSI prefix to influence sorting and a fake blank completion entry to suppress readline's prefix insertion. Those workarounds are not appropriate in PyREPL because the reader already owns completion ordering and menu rendering, so the fake entries leaked into the UI as real terminal attributes and empty menu cells. Sort completion candidates in ReadlineAlikeReader by their visible text with stripcolor(), and let the fancy completer return only real matches. That keeps colored completions stable without emitting bogus escape sequences, removes the empty completion slot, and adds regression tests for both the low-level completer output and the reader integration. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| __main__.py | ||
| support.py | ||
| test_eventqueue.py | ||
| test_fancycompleter.py | ||
| test_input.py | ||
| test_interact.py | ||
| test_keymap.py | ||
| test_pyrepl.py | ||
| test_reader.py | ||
| test_terminfo.py | ||
| test_unix_console.py | ||
| test_utils.py | ||
| test_windows_console.py | ||