Exafunction / codeium.nvim

A native neovim extension for Codeium
MIT License
639 stars 50 forks source link

Completions including a carriage return (^M) do not get cleaned up properly when unselected #168

Open BartHageman opened 2 months ago

BartHageman commented 2 months ago

On Windows, some completion options will include a carriage return character. These can be seen as (^M) at the end of the completion option. When choosing such options from the cmp menu the text is inserted, but not cleaned up completely when unselected. The part inserted before the carriage return remains. This inserts partial/broken code for every cmp option you hover over, until you confirm one option.

To reproduce: Use neovim, cmp and codeium.nvim on windows. completeopt = 'menu,menuone,noinsert'. Edit a file and write some text that will trigger multiple multiline completion options. (I wrote the start of a function). Scroll through the options in the list. Text is inserted into the buffer without confirmation. Upon confirmation, only the selected option remains.