OmniSharp / omnisharp-vim

Vim omnicompletion (intellisense) and more for C#
http://www.omnisharp.net
MIT License
1.72k stars 168 forks source link

Errore while using autocomplete menu #653

Closed MaxPlap closed 4 years ago

MaxPlap commented 4 years ago

Immagine

The error happens while trying navigate autocomplete menu with arrows. The configuration is the same of the example except the theme.

nickspoons commented 4 years ago

Please (as in any bug report) provide details to help people reproduce this issue.

What is your:

MaxPlap commented 4 years ago

Vim 8.1.2269

202011042035_990904_omnisharp.log vers

Sorry for the delay

nickspoons commented 4 years ago

OK this is interesting. I've never come accross this before because I don't use arrow keys for the completion menu, but I can reproduce it now.

The issue is that arrow keys have a different way of dealing with completions, see :help popupmenu-keys:

\ Select the next match, as if CTRL-N was used, but don't insert it.

So when preparing to fetch the signature help or documentation to populate a popup, the line looks like Console., whereas it looks like Console.Beep when using CTRL-N.

I'm not quite sure what the best thing to do is. I think we'll have to try to do something a bit hacky and modify the line in the server documentation request.

nickspoons commented 4 years ago

OK I think this should do it.

There's an edge case that this fix doesn't handle, and that is using a combination of CTRL-N/CTRL-P and arrow keys. That is, if you navigate the completion list with CTRL-N/CTRL-P and then with arrow keys, there will be empty documentation popups for the arrow key navigations. But there will not be any errors.