-
Notifications
You must be signed in to change notification settings - Fork 815
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
Key panel widget #4876
Key panel widget #4876
Conversation
# ...cause the first completion to be highlighted. | ||
self._action_cursor_down() | ||
# If there is one option, assume the user wants to select it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this subject to the same issue as what we discussed earlier regarding having the first option always highlighted by default? If they can come in asynchronously, then when the user presses enter there may only be 1, but this doesn't mean there will always be one.
I think in VSCode and the browser URL bar, it also does things asynchronously, but it just selects the one that was at the top when the user presses enter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That does introduce a 100ms window where something could change. I'll see if I can remove that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed the timer for now. In a future update, I'll implement the logic to highlight the first item.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and works well. I made a few suggestions which I don't think need to be part of this PR, but would be nice to create tasks for and tackle relatively soon IMO (otherwise they'll end up forgotten).
Another thing that I just noticed in the |
Adds a
KeyPanel
which can be summoned via the command palette.