AlecAivazis / survey

A golang library for building interactive and accessible prompts with full support for windows and posix terminals.
MIT License
4.09k stars 352 forks source link

survey.Input input is removed after validation #310

Closed nicocha30 closed 3 years ago

nicocha30 commented 3 years ago

What operating system and terminal are you using?

Fedora 31, tested with Tilix (zsh) and Gnome Terminal (bash).

An example that showcases the bug.

Using the examples/simple.go file, after writing the first answer and hitting the Return key, my input is removed.

surveyissue

What did you expect to see?

The same behavior as the example on the README

image

Thanks a lot,

Nicolas

AlecAivazis commented 3 years ago

Hey @Nicocha30! thanks for bringing this up, we recently merged in a nice update to the inputs and apparently i missed this.

I'll get a fix in right now :)

AlecAivazis commented 3 years ago

This should now be fixed and released as part of v2.2.2. please let me know if you still run into this

samcoe commented 3 years ago

Just wanted to add a note here saying that a slight variation of this issue still seems to be present in v2.2.2, where if the default input value is selected it is not showing up in the response. It was reported by one of our users here.

AlecAivazis commented 3 years ago

Hey @samcoe thanks for bringing this up. I'm going to reopen the issue so i dont forget.

AlecAivazis commented 3 years ago

@samcoe this should now be fixed in v2.2.3. Thanks again for bringing it up and being patient

samcoe commented 3 years ago

@AlecAivazis thanks for the rapid fix! 🙇