Visitar URL original
gh-158955: PyREPL Update changed line planning for WSL by edvilme · Pull Request #158995 · python/cpython · GitHub
Skip to content

gh-158955: PyREPL Update changed line planning for WSL - #158995

Open
edvilme wants to merge 6 commits into
python:mainfrom
edvilme:pyrepl-wsl-insert-char
Open

edvilme wants to merge 6 commits into
python:mainfrom
edvilme:pyrepl-wsl-insert-char

Conversation

@edvilme

@edvilme edvilme commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

PyREPL treated every single-character addition as an insertion, emitting the terminal’s ICH/INS control sequence before writing the character. On WSL, emitting INS at the end of a line could disturb terminal rendering and leave the displayed prompt/cursor out of sync.

This change uses a normal character write when appending at the end of the line, while preserving INS for true mid-line insertions.

Example: typing e after nam| now directly produces name|. INS remains used when inserting into nme to produce name.

@edvilme
edvilme marked this pull request as ready for review October 8, 2026 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant