AlecAivazis / survey

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

[#101] Fix survey duplicate lines bug by getting the width of the terminal #292

Closed tomercy closed 4 years ago

tomercy commented 4 years ago

This PR solves issue #101 . Created a new function to determine the terminal width and conclude the number of lines the input takes before calling the "resetPrompt" function.

AlecAivazis commented 4 years ago

Hey @tomercy thanks for the submission! It looks like this relies on the stty command which unforuntately does not exist on windows machines. Have you tried this on cmd.exe or any other windows console?

tomercy commented 4 years ago

My solution actually caused another bug so I closed it.... ^^