roxma / nvim-completion-manager

:warning: PLEASE USE https://github.com/ncm2/ncm2 INSTEAD
MIT License
917 stars 49 forks source link

Leaves vim in a weird state if using ^C while showing completions #87

Closed fortes closed 7 years ago

fortes commented 7 years ago

I'm getting some weird behavior after hitting ^C when using this plugin. To repro:

  1. Open any file.
  2. Begin typing and wait for a completion to appear
  3. Hit ^C (control-c)
  4. Hit d, which will now incorrectly delete the entire line

Using the following init.vim (with vim-plug) on nvim 0.1.7:

call plug#begin()
Plug 'roxma/nvim-completion-manager'
call plug#end()

This doesn't repro if I disable nvim-completion-manager.

Shougo commented 7 years ago

Same issue of https://github.com/Shougo/deoplete.nvim/issues/477.

roxma commented 7 years ago

Wired. I cannot reproduce this issue on my machine (with nvim v0.2.0)

You could use <c-[> (same as <ESC>) instead of <c-c>.

Or just map <c-c> to <ESC>

fortes commented 7 years ago

So is the lack of an InsertLeave event when using <c-c> a bug in NeoVim?

Shougo commented 7 years ago

So is the lack of an InsertLeave event when using a bug in NeoVim?

No. This is the feature of Vim/NeoVim. Please read the documentation.

                            *InsertLeave*
InsertLeave         When leaving Insert mode.  Also when using
                CTRL-O |i_CTRL-O|.  But not for |i_CTRL-C|.