neoclide / coc.nvim

Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Other
24.27k stars 956 forks source link

CoC's updated suggestions deselect my selection #4733

Closed MahdiNazemi closed 12 months ago

MahdiNazemi commented 1 year ago

Result from CocInfo

## versions

vim version: VIM - Vi IMproved 8.2 8024919
node version: v16.10.0
coc.nvim version: 0.0.82-3dc6153a 2023-07-21 00:22:17 -0500
coc.nvim directory: /home/nazemi/.vim/plugged/coc.nvim
term: tmux
platform: linux

## Log of coc.nvim

2023-08-25T18:02:13.484 INFO (pid:764508) [attach] - receive notification: updateConfig [ 'list.height', 10 ]
2023-08-25T18:02:13.486 INFO (pid:764508) [attach] - receive notification: updateConfig [ 'list.maxPreviewHeight', 30 ]
2023-08-25T18:02:13.486 INFO (pid:764508) [attach] - receive notification: updateConfig [ 'list.previewToplineOffset', 12 ]
2023-08-25T18:02:13.618 INFO (pid:764508) [plugin] - coc.nvim initialized with node: v16.10.0 after 468
2023-08-25T18:02:14.991 INFO (pid:764508) [attach] - receive notification: highlight []
2023-08-25T18:02:16.044 INFO (pid:764508) [attach] - receive notification: showInfo []

Describe the bug

I have "suggest.noselect": true, in my CocConfig. Sometimes CoC loads a first set of suggestions, and shortly after, updates to provide a larger number of suggestions. If I select a suggestion from the first set, the later CoC update deselects it, so I have to scroll through the suggestions to select the item again.

The expected behavior is for CoC to remember the selection, or provide suggestions only once.

Reproduce the bug

We will close your issue when you don't provide minimal vimrc and we can't reproduce it

chemzqm commented 12 months ago

Seems you're using <up> and <down> for navigate complete items, which doesn't insert word.

MahdiNazemi commented 12 months ago

Yes, you are right. I use the up and down keys to navigate suggestions.