-
Notifications
You must be signed in to change notification settings - Fork 94
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 Page-Up and Page-Down key for list prompt #69
Conversation
This is pretty cool, but I'm not sure if the added complexity is worth it. I'm also not sure whether it's a standard terminal convention - it's not listed at https://en.wikipedia.org/wiki/GNU_Readline I'd be more open to |
oh! I already have modified code for various keystrokes changes locally, including Home and End behaviors. Now because I have a multiple selection that needs to display a large number of items, using the Page button can improve search efficiency. I have used the Implementing Home and End is much simpler than Page buttons. If this feature is not acceptable or needs to be reconsidered, I can complete the Home and End functions first. For Home/End/PgUp/PgDn key, btw, if |
Would the
I'm open to a refactor if it simplifies the code and mental overhead. There are quite a lot of moving parts and the more features like this we add, the harder it becomes to maintain and regression test later. If the It might also be best to wait until #58 is merged or closed as it would need to be considered in anything we do here. Incidentally, I have some ideas to improve the testability of these sorts of interactions that would allow us to assert against the complete output of individual render cycles in a sequence. |
I'm willing to wait for the multiple searches to complete. This also gave me time to write some tests on the refactored function. |
Hey @crazywhalecc, #58 is merged now. Does the new If not, feel free to update this PR, and we can review it again. As mentioned previously, I'd prefer to start by adding If that is successful, we could look at |
Thanks! I will work on it. And another small question: What should the behavior of the Home key look like in Suggest and Search? Assuming that I am already selecting an item, should I go back to the input box or highlight the first item? |
It's hard to know without playing with it, but I think if you're currently navigating the list (i.e. I think you'd need to use the new |
Updated in #79. |
This PR allows list-related prompts to support page-turning display using the Page-Up and Page-Down keys.