maralla / completor.vim

Async completion framework made ease.
MIT License
1.31k stars 62 forks source link

Completion popup always flickers #137

Closed jeromedalbert closed 7 years ago

jeromedalbert commented 7 years ago

Steps to reproduce:

  1. Create a minimal.vim file with the following content:

    call plug#begin('~/.vim/plugged')
    Plug 'maralla/completor.vim'
    call plug#end()
  2. Run nvim -u minimal.vim with Neovim v0.2.1

  3. Type some text that triggers the completion popup

Actual behavior

The popup flickers whenever I type a letter:

tenderloin3

Expected behavior

The popup should not flicker.

Any idea why this is happening to me?

maralla commented 7 years ago

The popup always flickers because whenever a letter is typed the popup is closed by vim and then opened by completor. Completor tries to always get the fresh completion list. There is a way to improve the problem with the latest commit:

let g:completor_refresh_always = 0

After this config added to your vimrc the popup will not be refreshed if there are completion candidates prefixed by the letters you typed.

jeromedalbert commented 7 years ago

Ok, I thought it was a problem on my side, because the popup on the Readme GIF doesn't flicker, but after looking at it more closely there is no real letter typing happening there. So I'm closing the issue.

By the way I tried let g:completor_refresh_always = 0 with the same scenario as in my GIF above, but it still flickers even though there is a completion candidate with the letters I typed.

maralla commented 7 years ago

I push a commit to fix the config. It will not flicker if you set let g:completor_refresh_always = 0 now.

jeromedalbert commented 7 years ago

Great, thanks!

jeromedalbert commented 7 years ago

Works well for buffer completion. Filename completion still flickers (minor)