prompts
prompts copied to clipboard
Problem with option multiselect in terminal VSCode
Describe the bug
When select a option the bug screen.
To Reproduce
- index.js
const prompts = require('prompts') prompts([ { type: 'multiselect', name: 'color', message: 'Pick colors', choices: [ { title: 'Red', value: '#ff0000' }, { title: 'Green', value: '#00ff00' }, { title: 'Blue', value: '#0000ff' } ] } ])
-
node index.js
-
Execute en click space in some option to bug.
System
- OS: Windows 10
- node v14.15.4
- terminal VSCode
Thanks! )
For me too...
Interesting! Is there a stack trace you can paste, or is there a crash in VSCode itself?
FWIW, on macOS 10.15, I cannot reproduce this issue using latest prompts
(tried: node 12 & 14 on Terminal, node 12 & 14 within VSCode Terminal).
You can see the issue here. As soon as I click space and select an item, the alignment goes off.
I still wasn't able to repro this unfortunately. Based on the screenshot, it doesn't look like prompts would be able to create this output (the whole terminal "window" is moving about 4.5 characters to the left). I wonder if you pressing SPACEBAR is triggering some other paging or scrolling mechanism inside VSCode and causing the entire terminal window to "scroll" 32 pixels or so to the right.
@elliot-nelson I just checked right-arrow
vs spacebar
and it seems you're correct. It only happens with spacebar
.