Only use the tagstack if the file actually exists

This caused problems when using jedi-vim without an actual file behind a buffer.
This commit is contained in:
Dave Halter
2017-10-11 00:32:17 +02:00
parent edde267f6b
commit 85020495ef

View File

@@ -270,7 +270,7 @@ def goto(mode="goto", no_output=False):
using_tagstack=using_tagstack)
if not result:
return []
if d.module_path and using_tagstack:
if d.module_path and os.path.exists(d.module_path) and using_tagstack:
tagname = d.name
with tempfile('{0}\t{1}\t{2}'.format(tagname, d.module_path,
'call cursor({0}, {1})'.format(d.line, d.column + 1))) as f: