-
-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using select with message longer than terminal width duplicates the message. #153
Labels
bug
Something isn't working
Comments
I can verify this - but it doesn't even need to be a small screen - as soon as the message is multi-line the bug appears 😭 const questions = [{
type: 'select',
name: 'rootType',
message: 'What would you like to do today?\n More info on the full flow can be found at\n https://open-wc.org/create/',
choices: [
{ title: 'Scaffold a new project', value: 'scaffold' },
{ title: 'Upgrade an existing project', value: 'upgrade' },
{ title: 'Nah, I am fine thanks! => exit', value: 'exit' },
],
initial: 1,
}]; |
Thank you for reporting this bug |
I've been reading my code for hours thinking I had made a mistake. Good thing I checked here. Thanks for the report! |
The list of options also duplicates if the list is taller than the window. |
terkelg
pushed a commit
that referenced
this issue
Jul 5, 2019
* fix(select): duplicate when text > 1 line * fix(confirm): duplicate when text > 1 line * fix(date): duplicate when text > 1 line + simplified TextPrompt.render() * fix(toggle): duplicate when text > 1 line * fix(number): duplicate when text > 1 line * fix(autocomplete): duplicate when text > 1 line * fix(number): cursor pos when error is shown * fix(prompt): Use existing clear function + export lines function * fix(date): Formatting * fix(prompt): formatting * Updated sisteransi + removed util/ansi.js * fix(dependency): anticipate next version of sisteransi (1.0.2)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Using select with message longer than terminal width duplicates the message and breaks the UI.
To Reproduce
Just run this script in a relatively narrow terminal window:
Expected behavior
It should detect terminal width and adjust cursor automatically. It shouldn't duplicate the message.
System
v11.12.0
Additional context
Might be related to #89
The text was updated successfully, but these errors were encountered: