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

Function keyword completion fails if cursor is in the middle of the complete parentheses #1531

Closed
wants to merge 4 commits into from

Conversation

piti118
Copy link
Contributor

@piti118 piti118 commented Mar 28, 2012

This PR fix this issue

hist(c<tab>

This will suggest function keyword argument completion like color etc.
However, (note the last parenthesis)

hist(c<cursor here, tab>)

This does not suggest the function keyword argument completion even though it should.

@takluyver
Copy link
Member

Well spotted! I'll test this out later.

@fperez
Copy link
Member

fperez commented Apr 15, 2012

This looks good, but before we merge it, we should add a test that fails when the fix isn't present but succeeds after it. @piti118, the completer machinery already has some tests, so it shouldn't be too hard to add one more. But do let us know if you need a hand with it, and we'll be happy to help.

That way, we'll ensure that in the future this problem doesn't reappear as the code evolves.

Thanks for your contribution, @piti118!

@piti118
Copy link
Contributor Author

piti118 commented Apr 15, 2012

stupid question but... how do I run the existing test?

@fperez
Copy link
Member

fperez commented Apr 15, 2012

Use the iptest command, which can be given arguments to run just some tests. The developer docs have more details on how to run tests in general; let us know if you have any trouble with it and we'll be happy to help out.

@piti118
Copy link
Contributor Author

piti118 commented Apr 16, 2012

Done. Can you check it out?

@fperez fperez closed this in a3e0a81 Apr 16, 2012
@fperez
Copy link
Member

fperez commented Apr 16, 2012

@piti118, thanks! BTW, in general you should never merge from master into a feature branch you are doing a pull request from, as that creates nasty criss-crossing in the git history graph, making it harder to see exactly what is new to a given branch. If you need the code from master, you should instead rebase your changes on top of master.

I've done that for you this time so we could close this PR, so the commits that were merged have different hashes from yours, but keep it in mind for the future.

Thanks again for the contribution!

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Function keyword completion fails if cursor is in the middle of a line
that includes closing parenthesis.

Closes ipython#1531.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants