davidhalter / jedi-vim

Using the jedi autocompletion library for VIM.
MIT License
5.28k stars 370 forks source link

function call signatures in insert mode wraps erroneously #632

Closed thekswenson closed 3 years ago

thekswenson commented 7 years ago

Issue

When adding a function call the pop-up call signature often needlessly wraps to span 2 lines. Here is an example:

wrap

Steps to reproduce

  1. create a python file
  2. type a funciton call

Versions

In case you are not using jedi-vim from Git master, please test it there, too.

Output of the "JediDebugInfo" command (in a Python buffer)

Output of the "messages" Vim command

Output of "scriptnames" Vim command

1: /usr/share/vim/vimrc 2: /usr/share/vim/vim74/debian.vim 3: /usr/share/vim/vim74/syntax/syntax.vim 4: /usr/share/vim/vim74/syntax/synload.vim 5: /usr/share/vim/vim74/syntax/syncolor.vim 6: /usr/share/vim/vim74/filetype.vim 7: ~/.vimrc 8: /usr/share/vim/vim74/ftoff.vim 9: ~/.vim/bundle/Vundle.vim/autoload/vundle.vim 10: ~/.vim/bundle/Vundle.vim/autoload/vundle/config.vim 11: /usr/share/vim/vim74/ftplugin.vim 12: /usr/share/vim/vim74/indent.vim 13: /usr/share/vim/vim74/indoff.vim 14: /usr/share/vim/vim74/syntax/nosyntax.vim 15: ~/.vim/colors/Dark2_kms.vim 16: ~/.vim/bundle/supertab/plugin/supertab.vim 17: ~/.vim/bundle/csapprox/plugin/CSApprox.vim 18: ~/.vim/bundle/jedi-vim/plugin/jedi.vim 19: /usr/share/vim/vim74/plugin/getscriptPlugin.vim 20: /usr/share/vim/vim74/plugin/gzip.vim 21: /usr/share/vim/vim74/plugin/logiPat.vim 22: /usr/share/vim/vim74/plugin/manpager.vim 23: /usr/share/vim/vim74/plugin/matchparen.vim 24: /usr/share/vim/vim74/plugin/netrwPlugin.vim 25: /usr/share/vim/vim74/plugin/rrhelper.vim 26: /usr/share/vim/vim74/plugin/spellfile.vim 27: /usr/share/vim/vim74/plugin/tarPlugin.vim 28: /usr/share/vim/vim74/plugin/tohtml.vim 29: /usr/share/vim/vim74/plugin/vimballPlugin.vim 30: /usr/share/vim/vim74/plugin/zipPlugin.vim 31: ~/.vim/bundle/csapprox/after/plugin/CSApprox.vim

davidhalter commented 7 years ago

So you do have that problem if your terminal is big enough to show the call signatures?

What's your :set wrap?

thekswenson commented 7 years ago

"wrap" is set. In this case, the problem occurs even when the terminal is wide enough to show the call signature.

The problem does not occur when "nowrap" is set.

The problem has something to do with the number of characters in the line above the one I'm editing (the line that is written over with the call signature: if I delete the right number of characters from the line above, then the error will not occur. Also, if I resize the width of the terminal I can make wide enough so that the wrap doesn't occur.

blueyed commented 7 years ago

Have you tried using the cmdline-window mode instead?

blueyed commented 7 years ago

There might be a bug here for sure, but it seems none of the maintainers is eager to investigate, so also please feel free to do so yourself.. :)

blueyed commented 7 years ago

Please try/test #652 and provide feedback there - it might help in your case. See https://help.github.com/articles/checking-out-pull-requests-locally/ for help on checking it out locally.

thekswenson commented 7 years ago

I've checkout out your pull request locally. It doesn't seem to alleviate the problem... I see identical behavior.

blueyed commented 7 years ago

The issue is weird in general. Do you see it often?

Can you try it with a minimal vimrc, and/or bisect which other plugin might cause it?

davidhalter commented 3 years ago

Same issue as #493. We are trying to get rid of changing the buffer for this feature and are trying to use floating windows.