sg.nvim icon indicating copy to clipboard operation
sg.nvim copied to clipboard

Bug: selecting the cmp autocompletion automatically inserts and closes the floating window

Open arnevm123 opened this issue 2 years ago • 2 comments

Hi,

I have these setting with cmp:

mapping = cmp.mapping.preset.insert({
	["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
	["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
....

When i use this with normal completion I can scroll the completion options with this, but when selecting a cody completion this closes my completion menu. I got this while using nightly (NVIM v0.10.0-dev-2121+g06aebfa99), but not when using stable (v0.9.5) I'm not quite sure if this is a Neovim issue, because it's only on nightly, or a cody issue, because I only get it with cody (or a cmp issue, who knows?). Video for explanation (I just try to scroll through the options with <C-n>):

https://github.com/sourcegraph/sg.nvim/assets/93863978/d1fb4f84-457a-4296-9c74-8dd0bd1f90bf

arnevm123 avatar Jan 18 '24 08:01 arnevm123

imgur mirror for video, because it seems to be buggy: https://imgur.com/nIEMj1y

arnevm123 avatar Jan 18 '24 08:01 arnevm123

oh, that's really interesting. Thanks for the video and repro steps. I will check it out!

tjdevries avatar Jan 18 '24 15:01 tjdevries