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

Prevent cursor from being hidden #312

Closed apolitis-work closed 3 years ago

apolitis-work commented 3 years ago

The cursor was hidden during input. This allows the cursor to be displayed.

AlecAivazis commented 3 years ago

Hey @apolitis-work!

Mind giving me a little more context about this change? at the moment the cursor doesn't really behave as it "should" so i think i'm inclined to leave it hidden until we address #305

apolitis-work commented 3 years ago

Sure thing! In our CLI application, we just wanted to have the cursor show up on the line which we were typing our input on. This fix seemed to make that happen, and I figured I would just submit a PR to see if you thought it was worth merging.

So ideally after #305 a user could just press up and down to move the cursor onto a selected line? I suppose my change would break that. I'm fine with leaving the cursor hidden if I'm interpreting that correctly

AlecAivazis commented 3 years ago

Yea that's the intent. Screenreaders will read the line that the cursor is on so we really do need to move the cursor so that it always lines up correctly. I'll go ahead and close this PR to keep things tidy. thanks for opening it!