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

Toggle suggestions #13

Merged
merged 5 commits into from
Sep 17, 2024
Merged

Toggle suggestions #13

merged 5 commits into from
Sep 17, 2024

Conversation

dingfeli
Copy link
Contributor

Premise

This change enables users to switch between suggestions.
Note that this change does not include a visual component to convey the number of suggestions there are (since that would requires some additional discussions, which would likely take place next week).

The users are permitted to cycle through suggestions under the following circumstance:

  • There are more than one suggestions returned by the ls
  • The user has not typed ahead in the current suggestion (if they have, the hot key registered would go un-intercepted and potentially result in an input.

Test

Here you can see the toggling in action. I had set the hot key to 'opt + [' and 'opt + ]' for backwards and forwards respectively.
The input sequence for the hotkey, when un-intercepted, produces " and ' respectively.
This is why you see " being input during the typeahead below, demonstrating that the suggestion toggling is no longer enabled once typeahead has started.
toggling

Once user has returned to the caret positions prior to any typeahead, the toggling is once again enabled:
toggling-reenabled

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@breedloj breedloj merged commit c66a378 into main Sep 17, 2024
1 check failed
@breedloj breedloj deleted the toggle-suggestions branch September 17, 2024 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants