aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorDan Davison2012-05-17 00:03:30 -0300
committerFabián Ezequiel Gallina2012-05-17 00:03:30 -0300
commit9a5fc059730c7c28808b8ead58c8b1d370670a8d (patch)
tree7bf3a75d8942ea297ca6ea079c5ce78438661718 /lisp/progmodes/python.el
parentc7815c384be68b5ec6fbf3207ec59eb45cb21896 (diff)
downloademacs-9a5fc059730c7c28808b8ead58c8b1d370670a8d.tar.gz
emacs-9a5fc059730c7c28808b8ead58c8b1d370670a8d.zip
Don't request completions for zero-length input
Fixes a bug in which incorrect completion output was displayed, for example when point was after a closing paren.
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index f75b5cb51ae..47bdef2c928 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1633,8 +1633,9 @@ completions on the current context."
1633 (string-match "^\\(from\\|import\\)[ \t]" line)) 1633 (string-match "^\\(from\\|import\\)[ \t]" line))
1634 (python-shell-completion--get-completions 1634 (python-shell-completion--get-completions
1635 line process python-shell-module-completion-string-code) 1635 line process python-shell-module-completion-string-code)
1636 (python-shell-completion--get-completions 1636 (and (> (length input) 0)
1637 input process python-shell-completion-string-code))) 1637 (python-shell-completion--get-completions
1638 input process python-shell-completion-string-code))))
1638 (completion (when completions 1639 (completion (when completions
1639 (try-completion input completions)))) 1640 (try-completion input completions))))
1640 (cond ((eq completion t) 1641 (cond ((eq completion t)