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

PythonConsole: the list of completions in the autocomplete context menu no longer shows any objec path leading up to the final symbol being completed #7023

Merged
merged 2 commits into from Apr 12, 2017

Conversation

michaelDCurran
Copy link
Member

This object path was always the same for all items for a given completion and caused choosing an item to be inefficient for the user (especially for large menus).

An example:
typing nav.parent.n and pressing tab used to list:
nav.parent.name
nav.parent.next
Now it lists:
name
next

…nu no longer shows any objec path leading up to the final symbol being completed. This object path was always the same for all items for a given completion and caused choosing an item to be inefficient for the user (especially for large menus).

 An example:
 typing nav.parent.n and pressing tab used to list:
 nav.parent.name
 nav.parent.next
 Now it lists:
 name
 next
@derekriemer
Copy link
Collaborator

derekriemer commented Mar 28, 2017 via email

Copy link
Contributor

@jcsteh jcsteh left a comment

Choose a reason for hiding this comment

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

In addition to the below comment, please update the copyright end year.

@@ -249,7 +249,9 @@ def complete(self):
if self.completionAmbiguous:
menu = wx.Menu()
for comp in completions:
item = menu.Append(wx.ID_ANY, comp)
# Only show text after the last dot (so as to not keep repeting the class or module in the context menu)
label=comp.split('.')[-1]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this would be better as:

label = comp.rsplit('.', 1)[-1]

michaelDCurran added a commit that referenced this pull request Mar 28, 2017
@michaelDCurran michaelDCurran merged commit 9686896 into master Apr 12, 2017
@nvaccessAuto nvaccessAuto added this to the 2017.2 milestone Apr 12, 2017
jcsteh added a commit that referenced this pull request May 23, 2017
jcsteh added a commit that referenced this pull request Aug 17, 2017
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

4 participants