Skip to content

Pasting long line in new REPL causes text to appear after >>> #123177

Closed
@Siecje

Description

@Siecje

Bug report

Bug description:

When I paste code that is one line and my REPL window is small the text that would not be shown because it is offscreen is displayed after pressing enter.

For example I am pasting

thread = threading.Thread(target=lambda: threading.current_thread().name == 'MainThread')

After I paste and then press enter to create the object I see

>>> read')

I can't remove the text or use the arrow keys to navigate the letters since the >>> prompt is empty.

When the window is smaller more text is shown after >>>.

>>> thread = threading.Thread(target=lambda: threading.current_thread()\
                                                                                                                        >
>>> name == 'MainThread')

CPython versions tested on:

3.13

Operating systems tested on:

macOS

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions