forked from VimPlug/jedi-vim
Fix get_definition() deprecation.
This commit is contained in:
@@ -107,7 +107,7 @@ def goto(is_definition=False, is_related_name=False, no_output=False):
|
|||||||
if is_related_name:
|
if is_related_name:
|
||||||
definitions = script.related_names()
|
definitions = script.related_names()
|
||||||
elif is_definition:
|
elif is_definition:
|
||||||
definitions = script.get_definition()
|
definitions = script.goto_definitions()
|
||||||
else:
|
else:
|
||||||
definitions = script.goto()
|
definitions = script.goto()
|
||||||
except jedi.NotFoundError:
|
except jedi.NotFoundError:
|
||||||
@@ -150,7 +150,7 @@ def goto(is_definition=False, is_related_name=False, no_output=False):
|
|||||||
PythonToVimStr('Builtin ' + d.description)))
|
PythonToVimStr('Builtin ' + d.description)))
|
||||||
else:
|
else:
|
||||||
lst.append(dict(filename=PythonToVimStr(d.module_path),
|
lst.append(dict(filename=PythonToVimStr(d.module_path),
|
||||||
lnum=d.line_nr, col=d.column + 1,
|
lnum=d.line, col=d.column + 1,
|
||||||
text=PythonToVimStr(d.description)))
|
text=PythonToVimStr(d.description)))
|
||||||
vim.eval('setqflist(%s)' % repr(lst))
|
vim.eval('setqflist(%s)' % repr(lst))
|
||||||
vim.eval('jedi#add_goto_window()')
|
vim.eval('jedi#add_goto_window()')
|
||||||
|
|||||||
Reference in New Issue
Block a user