Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reprompting on every key stroke #26

Open
maranellored opened this issue Jun 5, 2017 · 7 comments
Open

Reprompting on every key stroke #26

maranellored opened this issue Jun 5, 2017 · 7 comments
Labels
bug Something isn't working

Comments

@maranellored
Copy link

I've been playing around with inquirer and I love the features!
One annoying bug that I've noticed though is that if the question is longer than my terminal width, then every single keystroke will cause the question to be rendered again in a new line.
This is pretty annoying since it can easily fill up my screen while I'm trying to type an answer to the question.
Is this a known problem? Or are there any workarounds for this issue?

Thanks!

@magmax
Copy link
Owner

magmax commented Jun 6, 2017

Yes, it is known.

I've not been able to retrieve the screen width, so it is not easy to solve.

Anyway, Inquirer is ready to use another renderers, because I thought in using curses as another option. This would fix the problem. But it is too much work, and very difficult to test automatically.

@maranellored
Copy link
Author

Thats fair, but I'm looking at your source code and it looks like you're using blessings-1.5.1 to handle the screen rendering.
From what I see, it looks like blessings-1.6 is out there - https://pypi.python.org/pypi/blessings/
Any idea if that'll fix this issue? It looks like it does have a Terminal.width function to return the width.
If you haven't tried it yet, I'm happy to spend some time looking into it later this week.

@magmax
Copy link
Owner

magmax commented Jun 12, 2017

If there is a Terminal.width, then I suppose there is no more excuses to not fix this :)

I will try when I have time enough.

Thanks for reporting!

@maranellored
Copy link
Author

Oh and I did notice that there is a newer and more up-to date version of blessings - https://github.com/jquast/blessed/tree/master/blessed
It seems to be pretty much backwards compatible with the original blessings library (was forked from it). Maybe that'll be a better choice.

@eggshell
Copy link

eggshell commented Apr 2, 2018

@magmax @maranellored Any update on this?

@magmax
Copy link
Owner

magmax commented Sep 23, 2018

I'm afraid not.

@K0K0SHA
Copy link

K0K0SHA commented Nov 3, 2024

I encountered this issue as well. Overall, I find inquirer slow, glitchy, and counter-intuitive.

EDIT: I also promise to fix this when I get a chance. I'll issue a pull request, hopefully before New Year 2024-2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants