Repository navigation
gh-157928: PyREPL detect OSC sequences - #157932
Conversation
Related python/cpython#157932 Related #25467 Modifies `_pyrepl.utils.ANSI_ESCAPE_SEQUENCE` to correctly support VSCode's OSC sequences and prevent cursor misplacing when using the REPL inside vscode. Refactorings for easier maintainability
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Brett Cannon <brett@python.org>
|
I have made the requested changes; please review again |
|
Thanks for making the requested changes! @brettcannon: please review the changes made to this pull request. |
|
Thanks @edvilme for the PR, and @brettcannon for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15. |
|
Sorry, @edvilme and @brettcannon, I could not cleanly backport this to Please backport manually with cherry_picker, see the devguide for more information. |
|
GH-160928 is a backport of this pull request to the 3.15 branch. |
|
GH-160935 is a backport of this pull request to the 3.14 branch. |
Improve how PyREPL detects and handles OSC (Operating System Command) sequences so that they are properly recognized and accounted for when calculating string widths and rendering lines.
Enhanced the
ANSI_ESCAPE_SEQUENCEregex inLib/_pyrepl/utils.pyto correctly match both CSI and OSC sequences, enabling accurate detection of OSC controls.Before
After