Skip to content

Cannot paste into REPL r-search #145375

Open

Description

@injust

Bug report

Bug description:

When you paste into the REPL r-search, it accepts the current result and then adds [200. This seems like bracketed paste mode not being handled correctly.

I tested this on Ghostty and Terminal.app.

CPython versions tested on:

3.14

Operating systems tested on:

macOS

Linked PRs

Activity

  1. added
    type-bug
    on Feb 28, 2026
  2. added
    topic-repl
    stdlib
    on Mar 1, 2026
  3. picnixz commented on Mar 1, 2026

    @picnixz
    Member

    Does it happen with the basic REPL? (PYTHON_BASIC_REPL=1 python)

  4. injust commented on Mar 1, 2026

    @injust
    ContributorAuthor

    It seems like there's no r-search in the basic REPL?

  5. tanloong commented on Mar 1, 2026

    @tanloong
    Contributor

    The \x1b part of the bracketed paste sequence \x1b[200~ is taken as isearch-end. This caused isearch mode to exit and displayed [200 as normal user input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibtopic-repltype-bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions