Skip to content

Pasting zero-width characters into PyREPL results in incorrect cursor position #139246

@grayjk

Description

@grayjk

Bug report

Bug description:

To reproduce

Tested with Python 3.14 rc3 on Linux

  1. Open the new REPL
  2. Paste: ééééé

The paste-able string above is five letter 'e's each followed by \u0301. To create it use:

print('e\u0301' * 5)

The \u0301 is a combining mark with zero-width display length

Current behavior

The cursor position is five spaces after the pasted string

Expected behavior

The cursor position is immediately after the pasted string

CPython versions tested on:

3.14

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-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