-
-
Notifications
You must be signed in to change notification settings - Fork 899
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
Draft: Copilot panel #4678
Open
kassick
wants to merge
8
commits into
emacs-lsp:master
Choose a base branch
from
kassick:copilot-panel
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Draft: Copilot panel #4678
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When some other overlay is active at point with a keymap property, even when its priority is lower than the inline completion priority, this foreign keymap may override the inline completion keymap. This happens, for example, when the inline completion is shown inside a pair inserted by smartparens. For example, the user types `[` followed `<return>` -- smartparens will insert the closing pair. The result is the buffer with the following state (cursor at `|`: ``` list = [ | ] ``` Smartparens will have placed an overlay from `[` to up `]`. This overlay has a keymap property mapping `C-g` to a function that removes the overlay. When inline completion is shown (either on idle or by user request), the keymap from smartparens overlay is active despite the inline completion overlay's higher priority. As a result, pressing `C-<return>` will likely display a message complaining the key is not bound. If the user presses `C-g` once, then they gain access to the inline completion keymap. This caused a weird bug in which a user gets a suggestion, but can't accept it. Pressing C-g only once would not cancel the completion, but pressing it again would indeed high the completion overlay. Explicitly asking for a suggestion at the same point would then display the completion overlay and the keymap would work as expected, since the first C-g removed the smartparens overlay. This commit fixes the issue by using a transient map when displaying the overlay. The transient map will take priority over any active overlay map, so we do not run into this issue from smartparens or any other mode that may be placing overlays with active keymaps.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Regarding #4661
Still WIP. Built on top of #4676