1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

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.
This commit is contained in:
Dan Davison 2012-05-17 00:03:30 -03:00 committed by Fabián Ezequiel Gallina
parent c7815c384b
commit 9a5fc05973

View file

@ -1633,8 +1633,9 @@ completions on the current context."
(string-match "^\\(from\\|import\\)[ \t]" line))
(python-shell-completion--get-completions
line process python-shell-module-completion-string-code)
(python-shell-completion--get-completions
input process python-shell-completion-string-code)))
(and (> (length input) 0)
(python-shell-completion--get-completions
input process python-shell-completion-string-code))))
(completion (when completions
(try-completion input completions))))
(cond ((eq completion t)