manifoldco / promptui

Interactive prompt for command-line applications
https://www.manifold.co
BSD 3-Clause "New" or "Revised" License
6.03k stars 333 forks source link

fix: end readline listener immediately if interrupt character is received #220

Open charliecruzan-stripe opened 1 year ago

charliecruzan-stripe commented 1 year ago

this is to fix a bug with select prompts where the prompt is sometimes still flushed to output even though the user has provided the interrupt key (this can cause confusion and looks not-so-pretty)

before (happens inconsistently):

image

after:

image

There might be use cases where you don't want to return immediately in this case, so let me know if that's the case!