diff --git a/plugin/jedi.vim b/plugin/jedi.vim index 9e0b013..640b2f3 100644 --- a/plugin/jedi.vim +++ b/plugin/jedi.vim @@ -92,7 +92,7 @@ if 1: else: text = 'import %s' % argl script=jedi.Script(text, 1, len(text), '') - comps = [ '%s%s' % (argl, c.complete) for c in script.complete()] + comps = ['%s%s' % (argl, c.complete) for c in script.completions()] vim.command("let comps = '%s'" % '\n'.join(comps)) EOF return comps diff --git a/plugin/jedi_vim.py b/plugin/jedi_vim.py index a355cdb..3215771 100644 --- a/plugin/jedi_vim.py +++ b/plugin/jedi_vim.py @@ -71,13 +71,14 @@ def complete(): column += len(base) try: script = get_script(source=source, column=column) - completions = script.complete() - call_def = script.get_in_function_call() + completions = script.completions() + sig = script.call_signatures() + call_def =sig[0] if sig else None out = [] for c in completions: - d = dict(word=PythonToVimStr(c.word[:len(base)] + c.complete), - abbr=PythonToVimStr(c.word), + d = dict(word=PythonToVimStr(c.name[:len(base)] + c.complete), + abbr=PythonToVimStr(c.name), # stuff directly behind the completion menu=PythonToVimStr(c.description), info=PythonToVimStr(c.doc), # docstr