Skip to content

[Bug] Duplicate lines #87

@artulloss

Description

@artulloss

Environment

  • OS: macOS
  • Node Version: v19.1.0
  • Package: @clack/prompts
  • Package Version: v0.3.0

Describe the bug

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-omu3tm?file=prompts.js

Steps to reproduce the behavior:

  • Put several options in a select, then shrink the terminal width so an option splits into multiple lines.

Expected behavior

The select should behave normally, moving arrows up and down should not duplicate everything. This seems to be a limitation of the terminal itself, perhaps truncation and an ellipsis of the long options would help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions