Skip to content

Bug: Select with default occasionally not in frame #206

@apainintheneck

Description

@apainintheneck

Are you in the right place?

  • For issues or feature requests file a GitHub issue in this repository
  • For general questions or discussion post in Discussions

Describe the problem

It seems like the default value is sometime out of frame with the select prompt.

Steps to reproduce the problem

tty-prompt-select-default-bug

Note that when the 20th position is the default value it is in frame but when the 18th position is the default value it is 2 lines above the visible content.

Actual behaviour

The default value was correct because clicking enter immediately provides the expected value but it is out of frame.

Expected behaviour

The default value should always start in frame and the cursor should always be in frame.

Describe your environment

  • OS version: macOS 10.15.7
  • Ruby version: 3.2.2
  • TTY::Prompt version: 0.23.1
  • Console: iTerm2, Terminal (default on macOS)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions