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

autocomplete in the middle of a word #1993

Closed
spyder-bot opened this issue Feb 17, 2015 · 6 comments
Closed

autocomplete in the middle of a word #1993

spyder-bot opened this issue Feb 17, 2015 · 6 comments

Comments

@spyder-bot
Copy link
Collaborator

From contrebasse on 2014-10-02T04:27:16Z

Spyder Version: 2.4.0dev (4183: r40ba8a1d98b2 )
Python Version: 2.7.8
Qt Version : 4.8.6, PyQt4 (API v2) 4.11.2 on Linux
pyflakes >=0.5.0: 0.5.0 (OK)
pep8 >=0.6 : 1.4.6 (OK)
IPython >=0.13 : 2.2.0 (OK)
pygments >=1.6 : 1.6 (OK)
pandas >=0.13.1 : 0.14.1 (OK)
sphinx >=0.6.6 : 1.2.3 (OK)
psutil >=0.3 : 2.1.1 (OK)
jedi >=0.8.0 : 0.8.1-final0 (OK)
matplotlib >=1.0: 1.4.0 (OK)
sympy >=0.7.0 : 0.7.5 (OK)
pylint >=0.25 : 1.3.1 (OK)

What steps will reproduce the problem?

  1. If | is the cursor position, put this in a new file:
    import numpy
    num|py
    1. Activate autocompletion, the file content is now ( bug1 ):
      import numpy
      numpy|py
    2. Press Ctrl+Z to undo the change, the file content is now:
      import numpy
      |py
    3. Press Ctrl+Z again, the file content is now ( bug2 ):
      import numpy
      num|py

What is the expected output? What do you see instead?

bug1 : I expected the end of the word not being repeated, so that the file content would be
import numpy
numpy| bug2 : I expected that a single press on Ctrl+Z would undo the whole completion instead of having to cancel twice.

Please provide any additional information below

.
The two bugs are independant but closely related so I reported them together.

Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1993

@spyder-bot
Copy link
Collaborator Author

From contrebasse on 2014-10-02T02:55:00Z

Erf, bug1 and bug2 were not supposed to be links...

@spyder-bot
Copy link
Collaborator Author

From steven.s...@gmail.com on 2014-10-02T03:06:21Z

Thinking out loud...

We could get the completions as usual, then check the remaining characters. If any of the completions contain the remaining characters, we advance the completion position and use those completions.

@spyder-bot
Copy link
Collaborator Author

From steven.s...@gmail.com on 2014-10-02T03:34:49Z

This is now fixed (pending PR merge): https://bitbucket.org/blink1073/spyderlib/commits/a65c6e0c2729c5a43fc32d1d270b35c66c492340

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-11-18T15:28:45Z

Labels: MS-v2.4
Blockedon: spyderlib:1213

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2015-02-08T09:17:26Z

Another bug fixed thanks to Steven!! Yay!

Labels: -MS-v2.4 MS-v2.3.3

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2015-02-08T09:17:39Z

Status: Fixed

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

No branches or pull requests

1 participant