-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
PyREPL does not recognize OSC sequences #157928
Copy link
Copy link
Open
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shellRelated to the interactive shelltype-featureA feature request or enhancementA feature request or enhancement
Description
Activity
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shellRelated to the interactive shelltype-featureA feature request or enhancementA feature request or enhancement
PyREPL’s
ANSI_ESCAPE_SEQUENCEregex currently recognizes CSI sequences but not Operating System Command (OSC) sequences. As a result, OSC sequences embedded insys.ps1, such as VS Code’sOSC 633terminal integration markers, are treated as visible characters and can cause incorrect prompt width calculation and cursor positioning. PyREPL should recognize OSC sequences as zero-width terminal controls.This is especially evident when pressing tab to autocomplete
Default
sys.ps1with no OSC sequenceOverwritten
sys.ps1with OSC sequenceNotice the difference in tab length, and after deleting, it is impossible to remove the remaining text (second picture)
Linked PRs