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

notebook autocomplete fail when typing number #1772

Closed
piti118 opened this issue May 28, 2012 · 2 comments
Closed

notebook autocomplete fail when typing number #1772

piti118 opened this issue May 28, 2012 · 2 comments

Comments

@piti118
Copy link
Contributor

piti118 commented May 28, 2012

Similar to #1696 this is what happen

def aab(): pass
def aa2b(): pass
def aa2bb(): pass
aa<TAB>

this shows both all of them
but when I type 2 I expect it to display 2 and the list should shrink to only the last two. However, what happen is the list disappear but 2 doesn't appear on the code cell.

@Carreau
Copy link
Member

Carreau commented May 28, 2012

This should be fixed when #1711 is merged, which bring a brand new completer.
But we might want to have a fix for a potential 0.12.2.

just in case here is a patch :

diff --git a/IPython/frontend/html/notebook/static/js/codecell.js b/IPython/frontend/html/notebook/static/js/codecell.js
index 5119461..5dead68 100644
--- a/IPython/frontend/html/notebook/static/js/codecell.js
+++ b/IPython/frontend/html/notebook/static/js/codecell.js
@@ -285,6 +285,7 @@ var IPython = (function (IPython) {
                     isCompSymbol : function (code)
                         {
                         return (code > 64 && code <= 90)
+                            || (code >= 48 && code <= 57)
                             || (code >= 97 && code <= 122)
                             || (code == 95)
                         },

Note : I added a label backport 0.12.2 If we ever want to have one.

@minrk
Copy link
Member

minrk commented Jun 1, 2012

confirmed fixed by #1711

@minrk minrk closed this as completed Jun 1, 2012
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

3 participants