Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #516 #517

Closed
wants to merge 1 commit into from
Closed

Fix issue #516 #517

wants to merge 1 commit into from

Conversation

MikeDacre
Copy link

Make g:jedi#popup_select_first=0 work as expected by preventing the
autoselection of the last item when first item not explicitly selected.

Fix for issue #516

Make g:jedi#popup_select_first=0 work as expected by preventing the
autoselection of the last item when first item not explicitly selected.
@MikeDacre
Copy link
Author

Note: I have tested this with vim + python2 and vim + python3, it works as expected with both.

@@ -489,6 +489,8 @@ function! jedi#complete_opened(is_popup_on_dot)
" option is set.
if g:jedi#popup_select_first && stridx(&completeopt, 'longest') > -1
return "\<Down>"
else
return ""
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, I'm pretty sure this brings up new issues, because it doesn't respect popup_on_dot.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidhalter Can you clarify how it breaks it? In my hands all combinations of popup_on_dot and popup_select_first work as expected. If you can tell me how you think it will cause an issue, I will be very happy to fix it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"popup_on_dot" is only used to trigger the completion (and therefore not relevant here), right?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it's also an argument here (below) and probably for some reason.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tested it using the popup_on_dot feature and without "noinsert" or "noselect" in &completeopt?
That's when it's expected to return <c-p>, but would return "" now.

Adding a test for these combinations would be really nice btw.. :)

@blueyed blueyed added the bug label Aug 15, 2016
@blueyed
Copy link
Collaborator

blueyed commented Jun 3, 2017

As noted before this PR by itself disables the code after it.

I've just created #713, which might help with your original issue (#516) maybe, too?

@blueyed blueyed closed this Jun 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants