Skip to content

bun repl: Duplicated lines when pasting text #27670

@xroberx

Description

@xroberx

What version of Bun is running?

1.3.10+30e609e08

What platform is your computer?

Linux 6.18.13-arch1-1 x86_64 unknown

What steps can reproduce the bug?

Test case with terminal width = 83:

> .copy "a".repeat(83)

(Press Ctrl+Shift+p or whatever key combination your terminal uses to paste)

What is the expected behavior?

A single pasted line with soft wrapping.

What do you see instead?

Two copies of the pasted line.

Additional information

When pasting text that does not fit in the available terminal width, bun repl generates a number of duplicate lines equal to the amount of characters that do not fit in the available width, and only the last line contains all of the characters (soft wrapped as expected).

For example, if the available terminal width is 83 columns, and you paste a line containing 83 characters, bun repl will generate 2 copies of the pasted line. Please note that this takes into account the 2 characters of the bun repl ("> ").

This bug seems to be related to issue #27461

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions