OmniSharp / omnisharp-vim

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

Pressing `<Esc>` with a popup open inserts `<Ignore>` in neovim #696

Closed shocklateboy92 closed 3 years ago

shocklateboy92 commented 3 years ago

Simplest way to repro (with just omnisharp-vim on neovim 0.4.4).

  1. Load a cs project
  2. Navigate to a function call in insert mode
  3. Use <C-o> with :OmniSharpSignatureHelp to open signature help popup while staying in insert mode
  4. Popup functions normally, but pressing <Esc> does not close it
  5. Instead it inserts the text <Ignore>.

Expected results

Closes the popup and stays in insert mode. Seems to work properly with regular vim.

Notes:

Looks like this is related to this line in popup.vim, but I don't fully understand what this is doing well enough to suggest a fix.

nickspoons commented 3 years ago

I have a feeling (but can't find any reference to this) that we've seen this before and it is fixed in newer versions of neovim. Do you have access to a 0.5 build?

shocklateboy92 commented 3 years ago

Well I'll be damned. I just tried latest git version of neovim and it seems to work correctly. However, it looks like their 0.5 milestone is not planned till June 15.

Could you explain the bug a little better (for my understanding :smile:)? Based on the comment above the function, it looks like it's binding an expression to create the popup async and return some sort of "nothing". But what is \<Ignore> as an expression? Why can't it just return "" instead?

nickspoons commented 3 years ago

I must admit I don't remember exactly what happens when returning "" rather than "\<Ignore>", but I do recall returning "\<Ignore>" for a reason (just not what the exact reason was 😂).

You can read the documentation about it here (3rd paragraph).

shocklateboy92 commented 3 years ago

Okay, I get it now (at least, enough to understand the odds of me being able to contribute a meaningful workaround before June 15 are very low :laughing: )

Thanks for the explanation and your prompt responses.