bchao1 / bullet

🚅 Interactive prompts made simple. Build a prompt like stacking blocks.
https://pypi.org/project/bullet/
MIT License
3.55k stars 113 forks source link

Calling Bullet.launch a second time causes text to overlap if the first choice wasn't taken the first time #6

Closed rcfox closed 5 years ago

rcfox commented 5 years ago
import bullet

b = bullet.Bullet('Choose one: ', choices=['dog', 'banana', 'telephone'])
b.launch()
b.launch()

The first time the choices are presented, choose 'telephone'

The next time, if you press the up key, 'dog' will be overwritten by 'telephone' and the prompt will be overwritten by 'banana'.

bchao1 commented 5 years ago

Seems like I forgot to reset the cursor position. This bug is fixed, please check!