I checked what jedi-vim was setting and I found the root cause, now there is no need to have jedi-vim to reproduce. The problem is related to 'completeopt' with longest.

Using the same test.vim from previous email, run vim as:

$ vim -S ~/test.vim --cmd 'set completeopt+=longest'
and then press 'i<c-x><c-o><c-n>'


Also, I found out that the issue is timing dependant, I was testing with tmux and if I send all the keys at once, the issue is not visible, but if I give a little delay to '<c-n>' the issue is there. To reproduce this:
Start tmux with
$ tmux
Split into two planes with
$ tmux split-pane
List panes with
$ tmux list-panes
The active pane should be %1 and the other should be %0
Now if I execute vim as
$ tmux send-keys -t %0 'vim -S test.vim --cmd "set completeopt+=longest"' C-m 'i' C-x C-o C-n
The issue is not visible, but if I execute as
$ tmux send-keys -t %0 'vim -S test.vim --cmd "set completeopt+=longest"' C-m 'i' C-x C-o ; sleep 1 ; tmux send-keys -t %0 C-n
The issue is there.

On 13/12/2019 21:41, Bram Moolenaar wrote:
Fabrizio Cabaleiro wrote:

*Bug description *
When using omni completion, content of preview window and/or separation
bar not redraw properly.

*How to reproduce*
Having jedi-vim plugin (commit c80a08d9835565bb8988d6314dfec616f70c53da):
$ mkdir $HOME/.vim/pack/python/start
$ cd    $HOME/.vim/pack/python/start
$ git clone --recursive https://github.com/davidhalter/jedi-vim.git

Using the following omnifunc:
$ cat test.vim
function! Omni_test(findstart, base)
     if(a:findstart)
        return col(".") - 1
     endif

     return [{"word":"one","info":"1info"},{"word":"two","info":"2info"}]
endfunction

set omnifunc=Omni_test

Start Vim:
$ vim -S test.vim

And then press "i<c-x><c-o><c-n>"
After pressing Ctrl-n the content of the preview window is wrong.

*Version*
VIM - Vi IMproved 8.2

*Compile configuration flags*
./configure --enable-pythoninterp=yes --prefix $HOME/local

*OS*
Linux Arch 5.4.2-arch1-1 #1 SMP PREEMPT Thu, 05 Dec 2019 12:29:40 +0000
x86_64 GNU/Linux

*Notes*
I tracked the issue to commit 04357fbb87e65e50cc76295aec50114adb5cbd68

Issue was first seen when writing python, but it is not necessary to
edit a python file to reproduce the issue, I just need to have the
plugin jedi-vim.
I tried without that plugin and it appears to work fine.
So to me it sounds like that plugin is causing trouble.


--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/MN2PR05MB61414BCE06D309BCB53F2A80D5570%40MN2PR05MB6141.namprd05.prod.outlook.com.

Raspunde prin e-mail lui