Skip to content

[Bug] Line wrapping + scrolling => duplicated lines #441

@brillout

Description

@brillout

Environment

  • OS: Linux
  • Node Version: 22.14.0
  • Package: @clack/prompts
  • Package Version: 0.11.0

Describe the bug

It's the bug described at #87:

The terminal duplicates options in a select when moving arrows up and down if the window is too small and the lines try to wrap. More of a rendering bug, because if you expand the terminal, it seems to start working normally, but the duplicates stay and aren't selectable.

To Reproduce

https://stackblitz.com/edit/node-u8x3xrsy?file=prompts.js

Note

It's the same reproduction as #87, but with additional options to trigger scrolling.

Steps to reproduce the behavior:

  • Press the down arrow key several times, then observe how the options are duplicated.
Image

See also

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions