jedi-vim icon indicating copy to clipboard operation
jedi-vim copied to clipboard

Function completion popup writes remnant artificats to buffer

Open perks opened this issue 9 years ago • 13 comments

Usually occurs when using tab completion, for example see below

=`=jedi=0, =`=                            (arg1, arg2, *_*arg3*_*, arg4='patch', arg5=None) =`=jedi=`=

All over the line.

What happens is once the line is finished editing, a particular argument becomes highlighted (in this case arg3).

Upon first inspection it looks like the line is fine, however upon "selecting the line" (movement to the line in normal mode) the screen changes and above text is replaced in the buffer.

The function being called look something like this:

    def helper_func(self, arg1, arg2, arg3, arg4='patch', arg5=None):

This isn't a visual bug either, it actually leaves text in the buffer, usually resulting in having to undo/rewrite the line (I catch it because it usually breaks my makefile)

perks avatar Nov 02 '15 22:11 perks

I remember having fixed something in this regard, but could not find it now (I am on mobile). IIRC there are cases where we cannot really prevent it.

A test case would be great. IIRC there should be something in the got history of "tests" regarding this.

See #412 about a workaround, and leave a vote in case you think the default should be changed.

blueyed avatar Nov 04 '15 00:11 blueyed

I ran across this issue today.

appeared when I cd into a directory through NERDTree plugin in gvim and opened a few files for editing, both python and plain text.

Surprisingly didn't appear in single edition of one py file with usual :cd beforehand, and I cannot reproduce it now.

If someone wants to investigate, maybe it's a starting point. In any case I’ll keep you informed if I can reproduce.

AlbericC avatar Nov 07 '15 16:11 AlbericC

I have a similar issue of jedi-vim leaving function signatures in the buffer, here is a screenshot. The cursor just typed the .. I haven't hit tab or anything like that.

screen shot 2015-11-11 at 7 45 17 pm

nZac avatar Nov 12 '15 00:11 nZac

It happens to me as well but very rarely and I'm not sure if it just happens if something bad happened before and jedi-vim basically "crashed".

davidhalter avatar Nov 12 '15 10:11 davidhalter

It only started after a recent upgrade, though I don't know what revision I was on and subsequently upgraded to. I am not a Vim ninja when it comes to debugging, so any suggestions on how to help find the issue, I am all ears and would be happy to help.

My vimrc is here: https://github.com/nZac/dotfiles/blob/35f97b06b46db8f85a2181df258a67f0a88e87ec/vim/vimrc.symlink if that is helpful.

nZac avatar Nov 12 '15 16:11 nZac

I suspect it has something to do with python3 annotations. I encountered the bug again with an annotated function, but not with the completion for other function in the same script, which were not annotated.

On Thu, Nov 12, 2015 at 5:30 PM, Nick Zaccardi [email protected] wrote:

It only started after a recent upgrade, though I don't know what revision I was on and subsequently upgraded to. I am not a Vim ninja when it comes to debugging, so any suggestions on how to help find the issue, I am all ears and would be happy to help.

My vimrc is here: https://github.com/nZac/dotfiles/blob/35f97b06b46db8f85a2181df258a67f0a88e87ec/vim/vimrc.symlink if that is helpful.

— Reply to this email directly or view it on GitHub https://github.com/davidhalter/jedi-vim/issues/493#issuecomment-156156848 .

AlbericC avatar Nov 12 '15 18:11 AlbericC

It seems to happen more and more :/ It's not about python3 annotations, I'm not using them.

davidhalter avatar Nov 28 '15 17:11 davidhalter

I have a minimal example that reproduces this for me 100%. Seems to happen when using completion inside calling another function.

selection_512

dpnova avatar Jun 28 '16 03:06 dpnova

Actually I think I had a typo in my conf - for some sill reason I'd put quotes around my "2" in show_call_signatures.

Upon testing a bit more, it seems that show_call_signatures = 1 gets rid of it and show_call_signatures = 2 brings it back. Very odd.

dpnova avatar Jun 28 '16 03:06 dpnova

Strange. 2 should do something completely different and not even touch the viewport (but should change the statusline).

davidhalter avatar Jul 21 '16 23:07 davidhalter

And for the missing conceiling with 1, make sure that the after part of the plugin gets used - which should typically be the case when using Vundle/syntastic etc, but might get missed when manually manipulating &runtimepath.

blueyed avatar Jul 22 '16 23:07 blueyed

@dpnova The tutorial in README file of this project does put quotes around the value of show_call_signatures...

JokerQyou avatar Sep 21 '16 01:09 JokerQyou

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

blueyed avatar Jan 08 '17 00:01 blueyed