prabirshrestha / asyncomplete.vim

async completion in pure vim script for vim8 and neovim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I fixed problem of enter key while popup is open on nvim

jibuntu opened this issue · comments

This problem happen when using neovim.
There isn't problem when using vim.

My problem

Peek 2020-08-03 03-38
I pushed enter key, but didn't close popupmenu.

After fix problem

Peek 2020-08-03 03-39

Edited code by me

https://github.com/jibuntu/asyncomplete.vim/blob/f175edb2877ccf565d496d67bc1542970e0cec3e/autoload/asyncomplete.vim#L140-L157

This is my commit that was fixed problem.
jibuntu@f175edb

i have the same problem, pressing enter doesnt close the popup, forcing me to press space, then enter to go to next line. I am on vim, not nvim

commented

This doesn't happen to me on either vim or nvim.

Perhaps you copied this line from README into your vimrc?

inoremap <expr> <cr>    pumvisible() ? "\<C-y>" : "\<cr>"

Either way I think this isn't something that should be fixed in this project. If it's only happening on nvim it's probably a bug in nvim. Though maybe we can remove this line from the README...

There is nothing wrong with adding extra inoremap in vimrc. This is actually quite common and some actually prefers different behavior so I would like to avoid asyncomplete dictating what users should do.

If you would like to improve docs feel free to send a PR to docs instead.