Skip to content

Line-wrapped syntax highlighting in Python shell spills over into program output #152068

Description

@DroneBetter

Bug report

Bug description:

As shown here, when I make the input long enough that the range gets wrapped with a backtick, all subsequent lines until the next command prompt become the same cyan as the text of range.
Image
Tangentially, is there any way to have Python itself stop doing this when the VScode terminal already did it for me in a way I find preferable (since it doesn't insert line-breaks into long one-liners copied from the shell)?

issue 140334 is similar, but this affects the shell, not just IDLE.

CPython versions tested on:

3.14

Operating systems tested on:

macOS, in both VScode and the terminal.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-macstdlibStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions