-
Notifications
You must be signed in to change notification settings - Fork 157
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
Add config for keeping menu always open #821
base: main
Are you sure you want to change the base?
Conversation
Would be nice to see a gif/video of what this looks like and a better description so that reviewers don't have to jump around figuring out what this PR is supposed to do. |
I'm not able to reproduce the panic. Can you give me the stack trace of it or some way to reproduce it? Does it happen when you do some specific thing?
It is configurable and can be disabled, but without it, user needs to manually close the menu with ESC before submitting the prompt. Another way to address this problem is how In this way, the Enter key is free for submitting the prompt, and Tab is used for switching between the menu items. I can add configuration for this as well if desired. |
It's some combination of hitting tab, backspace or tab, enter, backspace.
|
The panic also happens in the main branch. I will fix it in a separate PR. |
eece782
to
98ea337
Compare
now that the bug is out of the way, i'm thinking about this "implicit acceptance" you demonstrated above. i'm wondering what the most ergonomic way is to interact with a menu that is open all the time. |
Very appealing feature! Is it still working in process? I can help if any. |
The problem here is to find the best ergonomic way for accepting when the menu is still open. I'm open to implement the prompt toolkit way if desired, and I think since this feature is opt-in we can merge this PR for now and wait for people to use the feature and come with more ideas. |
FYI: my use case is to pop up the menu when a key is pressed. Maybe we can provide a custom event hook which can rewrite to edit action or discard an input event. |
Can you check if this PR as its current state satisfy your needs? |
I'd like to close the menu when the cursor is right after a whitespace. Can this PR achieve that? |
I think you can set an event for the space key to do that, but I'm not sure. |
fix #820