copilot-cmp icon indicating copy to clipboard operation
copilot-cmp copied to clipboard

Text Left Over After Aborting Completion Menu

Open CharlesARoy opened this issue 8 months ago • 0 comments

When I tab over a Copilot completion suggestion, it seems to actually add some of the text to the line I'm on (weirdly, before the cursor). Then, if I abort the completion menu, some of that added text is often left over, for example:

Copilot_bug

It only seems to happen when the suggestion occurs at an indented position on an otherwise blank line.

I don't think it's relevant, but this is my setup for <Tab> in cmp.setup{}: image

The command I run to abort the completion menu is cmp.abort() which, according to :h cmp.abort "closes the completion menu and restores the current line to the state before the current completion was started." But yeah, the line is definitely not being restored properly. That makes me think it's an issue with cmp but this issue only comes up for Copilot suggestions (possibly because other completion sources don't seem to offer suggestions on indented blank lines).

Any help is appreciated :)

CharlesARoy avatar Oct 26 '23 23:10 CharlesARoy