hrsh7th / nvim-cmp

A completion plugin for neovim coded in Lua.
MIT License
7.88k stars 394 forks source link

Main suggestion gets stuck in buffer, after changing focus to another window #1818

Closed blauweb closed 6 months ago

blauweb commented 7 months ago

Hi,

If I change the window once a suggestion has appeared next to my cursor, a ghost of that suggestion stays in that line of code and doesn't go away until I reset vim.

The issue happens specifically when I switch the focus to a different window (inside nvim) by mouse, while in insert mode; this does not happen if I change focus to a different app, or if I exit insert mode first and then change the focus.

This is not related to: #201 , the data stuck is something else. It's related to the ghost text as I understand,

Environment: Ubuntu 22.04 Gnome 42 Neovim with Lazyvim.

image