piotrmurach / tty-prompt

A beautiful and powerful interactive command line prompt
https://ttytoolkit.org
MIT License
1.47k stars 136 forks source link

per_page option issue #34

Closed keepcosmos closed 7 years ago

keepcosmos commented 7 years ago

Very thanks for adding per_page option that is what i exactly want. :)

But only one issue is question title is reproduced each time arrow key is pressed when elements are less than per_page value. <- I am sure only this case happen or not.

piotrmurach commented 7 years ago

Thanks for reporting! I haven't tested well the case when there is less options than per_page param.

Screenshot to remind me about the problem: screen shot 2017-01-08 at 12 40 03

kke commented 7 years ago

Also there doesn't seem to be a way to set default per_page

kke commented 7 years ago

If you set per_page to 15 and you have 14 items, the title duplication happens.

If you set per_page to 14 and you have 14 items, you get the "(Move up or down to reveal more choices)" even though there's only one page of items.

piotrmurach commented 7 years ago

Currently the per_page is per specific prompt configuration option. I don't see a problem why we couldn't have it as a TTY::Prompt.new configuration option. I will see if I've got time to fix it today.

piotrmurach commented 7 years ago

@keepcosmos Released v0.11.0. Enjoy!

keepcosmos commented 7 years ago

@piotrmurach Thanks 👍